2019-02-14 04:35:45 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
2019-05-22 12:03:39 +01:00
|
|
|
, fpc, gtk2, glib, pango, atk, gdk-pixbuf
|
2018-12-31 03:40:47 +00:00
|
|
|
, libXi, xorgproto, libX11, libXext
|
2020-05-25 01:21:51 +01:00
|
|
|
, gdb, gnumake, binutils
|
2014-11-07 08:40:55 +00:00
|
|
|
}:
|
2019-02-14 04:35:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "lazarus";
|
2020-05-05 20:15:24 +01:00
|
|
|
version = "2.0.8";
|
2019-02-14 04:35:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}.tar.gz";
|
2020-05-05 20:15:24 +01:00
|
|
|
sha256 = "1iciqydb0miqdrh89aj59gy7kfcwikkycqssq9djcqsw1ql3gc4h";
|
2008-04-08 16:10:09 +01:00
|
|
|
};
|
2019-02-14 04:35:45 +00:00
|
|
|
|
2014-11-07 08:40:55 +00:00
|
|
|
buildInputs = [
|
2018-12-31 03:40:47 +00:00
|
|
|
fpc gtk2 glib libXi xorgproto
|
|
|
|
libX11 libXext pango atk
|
2019-05-22 12:03:39 +01:00
|
|
|
stdenv.cc makeWrapper gdk-pixbuf
|
2014-11-07 08:40:55 +00:00
|
|
|
];
|
2019-02-14 04:35:45 +00:00
|
|
|
|
2008-04-08 16:10:09 +01:00
|
|
|
makeFlags = [
|
|
|
|
"FPC=fpc"
|
|
|
|
"PP=fpc"
|
2014-11-07 08:40:55 +00:00
|
|
|
"REQUIRE_PACKAGES+=tachartlazaruspkg"
|
|
|
|
"bigide"
|
2008-04-08 16:10:09 +01:00
|
|
|
];
|
2019-02-14 04:35:45 +00:00
|
|
|
|
2014-11-07 08:40:55 +00:00
|
|
|
preBuild = ''
|
2016-02-20 10:36:16 +00:00
|
|
|
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/"
|
2016-04-30 21:56:43 +01: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 21:31:11 +01:00
|
|
|
export LCL_PLATFORM=gtk2
|
2014-12-03 17:19:31 +00:00
|
|
|
mkdir -p $out/share "$out/lazarus"
|
2010-11-17 12:45:14 +00:00
|
|
|
tar xf ${fpc.src} --strip-components=1 -C $out/share -m
|
2008-04-08 16:10:09 +01:00
|
|
|
sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
|
2014-11-07 08:40:55 +00:00
|
|
|
'';
|
2019-02-14 04:35:45 +00:00
|
|
|
|
2014-11-07 08:40:55 +00:00
|
|
|
postInstall = ''
|
2020-05-25 01:21:51 +01:00
|
|
|
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' \
|
|
|
|
"$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')" \
|
2020-05-27 17:34:38 +01:00
|
|
|
--prefix NIX_LDFLAGS_${binutils.suffixSalt} ' ' \
|
2020-05-25 01:21:51 +01:00
|
|
|
"$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')" \
|
|
|
|
--prefix LCL_PLATFORM ' ' "$LCL_PLATFORM" \
|
|
|
|
--prefix PATH ':' "${fpc}/bin:${gdb}/bin:${gnumake}/bin:${binutils}/bin"
|
2014-11-07 08:40:55 +00:00
|
|
|
'';
|
2019-02-14 04:35:45 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2008-04-08 16:10:09 +01:00
|
|
|
description = "Lazarus graphical IDE for FreePascal language";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.lazarus.freepascal.org";
|
2019-02-14 04:35:45 +00:00
|
|
|
license = licenses.gpl2Plus ;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
2008-04-08 16:10:09 +01:00
|
|
|
};
|
|
|
|
}
|