2008-04-08 19:10:09 +04:00
|
|
|
args : with args;
|
|
|
|
rec {
|
2012-10-17 22:24:39 +04:00
|
|
|
version = "1.0.2";
|
|
|
|
versionSuffix = "-0";
|
2008-04-08 19:10:09 +04:00
|
|
|
src = fetchurl {
|
2012-10-17 22:24:39 +04:00
|
|
|
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
|
|
|
|
sha256 = "17a94wig8b4yrkq42wng4qbal7n77axkynwh78wday5whsp7div8";
|
2008-04-08 19:10:09 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [fpc gtk glib libXi inputproto
|
2009-07-15 00:31:11 +04:00
|
|
|
libX11 xproto libXext xextproto pango atk
|
2011-05-25 13:04:54 +04:00
|
|
|
stdenv.gcc makeWrapper gdk_pixbuf];
|
2008-04-08 19:10:09 +04:00
|
|
|
configureFlags = [];
|
|
|
|
makeFlags = [
|
|
|
|
"LAZARUS_INSTALL_DIR=$out/lazarus/"
|
|
|
|
"INSTALL_PREFIX=$out/"
|
|
|
|
"FPC=fpc"
|
|
|
|
"PP=fpc"
|
|
|
|
];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
|
|
|
phaseNames = ["preBuild" "doMakeInstall" "postInstall"];
|
|
|
|
|
2009-05-20 03:25:58 +04:00
|
|
|
preBuild = fullDepEntry (''
|
2011-05-25 13:04:54 +04:00
|
|
|
export NIX_LDFLAGS='-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'
|
2009-07-15 00:31:11 +04:00
|
|
|
export LCL_PLATFORM=gtk2
|
2012-01-19 00:16:00 +04:00
|
|
|
mkdir -p $out/share
|
2010-11-17 15:45:14 +03:00
|
|
|
tar xf ${fpc.src} --strip-components=1 -C $out/share -m
|
2008-04-08 19:10:09 +04:00
|
|
|
sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
|
|
|
|
'')
|
|
|
|
["minInit" "defEnsureDir" "doUnpack"];
|
|
|
|
|
2009-05-20 03:25:58 +04:00
|
|
|
postInstall = fullDepEntry (''
|
2009-07-15 00:31:11 +04:00
|
|
|
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
|
|
|
|
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
|
2008-04-08 19:10:09 +04:00
|
|
|
'') ["doMakeInstall" "minInit" "defEnsureDir"];
|
|
|
|
|
2009-07-14 13:08:05 +04:00
|
|
|
name = "lazarus-${version}";
|
2008-04-08 19:10:09 +04:00
|
|
|
meta = {
|
|
|
|
description = "Lazarus graphical IDE for FreePascal language";
|
2013-01-18 01:34:08 +04:00
|
|
|
homepage = http://www.lazarus.freepascal.org;
|
2009-08-25 13:00:19 +04:00
|
|
|
maintainers = [args.lib.maintainers.raskin];
|
2013-01-18 01:34:08 +04:00
|
|
|
#platforms = args.lib.platforms.linux;
|
2008-04-08 19:10:09 +04:00
|
|
|
};
|
|
|
|
}
|