2014-11-07 09:40:55 +01:00
|
|
|
{
|
|
|
|
stdenv, fetchurl
|
|
|
|
, fpc
|
2016-09-11 23:24:51 +02:00
|
|
|
, gtk2, glib, pango, atk, gdk_pixbuf
|
2014-11-07 09:40:55 +01:00
|
|
|
, libXi, inputproto, libX11, xproto, libXext, xextproto
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
s =
|
|
|
|
rec {
|
2017-12-11 11:33:23 +01:00
|
|
|
version = "1.8.0";
|
|
|
|
versionSuffix = "";
|
2012-10-17 20:24:39 +02:00
|
|
|
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
|
2017-12-11 11:33:23 +01:00
|
|
|
sha256 = "0i58ngrr1vjyazirfmz0cgikglc02z1m0gcrsfw9awpi3ax8h21j";
|
2014-11-07 09:40:55 +01:00
|
|
|
name = "lazarus-${version}";
|
2008-04-08 17:10:09 +02:00
|
|
|
};
|
2014-11-07 09:40:55 +01:00
|
|
|
buildInputs = [
|
2016-09-11 23:24:51 +02:00
|
|
|
fpc gtk2 glib libXi inputproto
|
2009-07-14 22:31:11 +02:00
|
|
|
libX11 xproto libXext xextproto pango atk
|
2014-12-17 19:11:30 +01:00
|
|
|
stdenv.cc makeWrapper gdk_pixbuf
|
2014-11-07 09:40:55 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
2008-04-08 17:10:09 +02:00
|
|
|
makeFlags = [
|
|
|
|
"FPC=fpc"
|
|
|
|
"PP=fpc"
|
2014-11-07 09:40:55 +01:00
|
|
|
"REQUIRE_PACKAGES+=tachartlazaruspkg"
|
|
|
|
"bigide"
|
2008-04-08 17:10:09 +02:00
|
|
|
];
|
2014-11-07 09:40:55 +01:00
|
|
|
preBuild = ''
|
2016-02-20 11:36:16 +01:00
|
|
|
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/"
|
2016-04-30 22:56:43 +02:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc.lib}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
|
2009-07-14 22:31:11 +02:00
|
|
|
export LCL_PLATFORM=gtk2
|
2014-12-03 18:19:31 +01:00
|
|
|
mkdir -p $out/share "$out/lazarus"
|
2010-11-17 13:45:14 +01:00
|
|
|
tar xf ${fpc.src} --strip-components=1 -C $out/share -m
|
2008-04-08 17:10:09 +02:00
|
|
|
sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
|
2014-11-07 09:40:55 +01:00
|
|
|
'';
|
|
|
|
postInstall = ''
|
2009-07-14 22:31:11 +02:00
|
|
|
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
|
|
|
|
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
|
2014-11-07 09:40:55 +01:00
|
|
|
'';
|
2008-04-08 17:10:09 +02:00
|
|
|
meta = {
|
2014-11-07 09:40:55 +01:00
|
|
|
inherit (s) version;
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus ;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2008-04-08 17:10:09 +02:00
|
|
|
description = "Lazarus graphical IDE for FreePascal language";
|
2013-01-17 22:34:08 +01:00
|
|
|
homepage = http://www.lazarus.freepascal.org;
|
2014-11-07 09:40:55 +01:00
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
2008-04-08 17:10:09 +02:00
|
|
|
};
|
|
|
|
}
|