2019-02-14 05:35:45 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
2019-05-22 13:03:39 +02:00
|
|
|
, fpc, gtk2, glib, pango, atk, gdk-pixbuf
|
2018-12-31 04:40:47 +01:00
|
|
|
, libXi, xorgproto, libX11, libXext
|
2014-11-07 09:40:55 +01:00
|
|
|
}:
|
2019-02-14 05:35:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "lazarus-${version}";
|
|
|
|
version = "1.8.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}.tar.gz";
|
2018-05-26 23:06:59 +02:00
|
|
|
sha256 = "1s8hdip973fc1lynklddl0mvg2jd2lzkfk8hzb8jlchs6jn0362s";
|
2008-04-08 17:10:09 +02:00
|
|
|
};
|
2019-02-14 05:35:45 +01:00
|
|
|
|
2014-11-07 09:40:55 +01:00
|
|
|
buildInputs = [
|
2018-12-31 04:40:47 +01:00
|
|
|
fpc gtk2 glib libXi xorgproto
|
|
|
|
libX11 libXext pango atk
|
2019-05-22 13:03:39 +02:00
|
|
|
stdenv.cc makeWrapper gdk-pixbuf
|
2014-11-07 09:40:55 +01:00
|
|
|
];
|
2019-02-14 05:35:45 +01:00
|
|
|
|
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
|
|
|
];
|
2019-02-14 05:35:45 +01: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
|
|
|
'';
|
2019-02-14 05:35:45 +01:00
|
|
|
|
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'" \
|
2019-02-14 05:35:45 +01:00
|
|
|
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
|
2014-11-07 09:40:55 +01:00
|
|
|
'';
|
2019-02-14 05:35:45 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
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;
|
2019-02-14 05:35:45 +01:00
|
|
|
license = licenses.gpl2Plus ;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
2008-04-08 17:10:09 +02:00
|
|
|
};
|
|
|
|
}
|