2014-11-07 08:40:55 +00:00
|
|
|
{
|
|
|
|
stdenv, fetchurl
|
|
|
|
, fpc
|
2016-09-11 22:24:51 +01:00
|
|
|
, gtk2, glib, pango, atk, gdk_pixbuf
|
2014-11-07 08:40:55 +00:00
|
|
|
, libXi, inputproto, libX11, xproto, libXext, xextproto
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
s =
|
|
|
|
rec {
|
2016-02-20 10:36:16 +00:00
|
|
|
version = "1.6";
|
|
|
|
versionSuffix = ".0-0";
|
2012-10-17 19:24:39 +01:00
|
|
|
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
|
2016-02-20 10:36:16 +00:00
|
|
|
sha256 = "1a1w9yibi0rsr51bl7csnq6mr59x0934850kiabs80nr3sz05knb";
|
2014-11-07 08:40:55 +00:00
|
|
|
name = "lazarus-${version}";
|
2008-04-08 16:10:09 +01:00
|
|
|
};
|
2014-11-07 08:40:55 +00:00
|
|
|
buildInputs = [
|
2016-09-11 22:24:51 +01:00
|
|
|
fpc gtk2 glib libXi inputproto
|
2009-07-14 21:31:11 +01:00
|
|
|
libX11 xproto libXext xextproto pango atk
|
2014-12-17 18:11:30 +00:00
|
|
|
stdenv.cc makeWrapper gdk_pixbuf
|
2014-11-07 08:40:55 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
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
|
|
|
];
|
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
|
|
|
'';
|
|
|
|
postInstall = ''
|
2009-07-14 21:31:11 +01:00
|
|
|
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
|
|
|
|
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
|
2014-11-07 08:40:55 +00:00
|
|
|
'';
|
2008-04-08 16:10:09 +01:00
|
|
|
meta = {
|
2014-11-07 08:40:55 +00:00
|
|
|
inherit (s) version;
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus ;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2008-04-08 16:10:09 +01:00
|
|
|
description = "Lazarus graphical IDE for FreePascal language";
|
2013-01-17 21:34:08 +00:00
|
|
|
homepage = http://www.lazarus.freepascal.org;
|
2014-11-07 08:40:55 +00:00
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
2008-04-08 16:10:09 +01:00
|
|
|
};
|
|
|
|
}
|