nixpkgs/pkgs/development/compilers/fpc/lazarus.nix
Michael Raskin 9e58814536 Changing CLisp, FPC to new style of adding to hydra
svn path=/nixpkgs/trunk/; revision=16855
2009-08-25 09:00:19 +00:00

45 lines
1.4 KiB
Nix

args : with args;
rec {
version = "0.9.26.2-0";
src = fetchurl {
url = "http://downloads.sourceforge.net/lazarus/lazarus-${version}.tgz";
sha256 = "5b582685c0447034580fe17c60b8fc84a8b097b6f31ff9b4583cf0eb741297cc";
};
buildInputs = [fpc gtk glib libXi inputproto
libX11 xproto libXext xextproto pango atk
stdenv.gcc makeWrapper];
configureFlags = [];
makeFlags = [
"LAZARUS_INSTALL_DIR=$out/lazarus/"
"INSTALL_PREFIX=$out/"
"FPC=fpc"
"PP=fpc"
];
/* doConfigure should be specified separately */
phaseNames = ["preBuild" "doMakeInstall" "postInstall"];
preBuild = fullDepEntry (''
export NIX_LDFLAGS='-lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0'
export LCL_PLATFORM=gtk2
ensureDir $out/share
tar xf ${fpc.src} --strip-components=1 -C $out/share
sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
'')
["minInit" "defEnsureDir" "doUnpack"];
postInstall = fullDepEntry (''
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
'') ["doMakeInstall" "minInit" "defEnsureDir"];
name = "lazarus-${version}";
meta = {
description = "Lazarus graphical IDE for FreePascal language";
homepage = http://www.lazarus.freepascal.org ;
maintainers = [args.lib.maintainers.raskin];
platforms = args.lib.platforms.linux;
};
}