2007-08-11 22:55:40 +02:00
|
|
|
args:
|
2009-03-03 14:27:40 +01:00
|
|
|
|
|
|
|
if args ? startFPC && args.startFPC != null then
|
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
with args;
|
2009-03-03 14:27:40 +01:00
|
|
|
|
2009-07-14 11:08:05 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-01-14 09:00:50 +01:00
|
|
|
version = "2.4.0";
|
2009-07-14 11:08:05 +02:00
|
|
|
name = "fpc-${version}";
|
2007-08-11 22:55:40 +02:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2009-07-14 11:08:05 +02:00
|
|
|
url = "http://downloads.sourceforge.net/sourceforge/freepascal/fpcbuild-${version}.tar.gz";
|
2010-01-14 09:00:50 +01:00
|
|
|
sha256 = "1m2g2bafjixbwl5b9lna5h7r56y1rcayfnbp8kyjfd1c1ymbxaxk";
|
2009-03-03 14:27:40 +01:00
|
|
|
};
|
2007-08-11 22:55:40 +02:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
buildInputs = [startFPC gawk];
|
2007-08-11 22:55:40 +02:00
|
|
|
|
2009-03-03 14:27:40 +01:00
|
|
|
preConfigure =
|
|
|
|
if system == "i686-linux" || system == "x86_64-linux" then ''
|
|
|
|
sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
|
|
|
|
'' else "";
|
2008-04-08 17:10:09 +02:00
|
|
|
|
2010-01-15 10:37:03 +01:00
|
|
|
preBuild = ''
|
|
|
|
fpcmake
|
|
|
|
'';
|
|
|
|
|
2009-02-26 16:14:17 +01:00
|
|
|
makeFlags = "NOGDB=1";
|
|
|
|
|
2007-08-11 22:55:40 +02:00
|
|
|
installFlags = "INSTALL_PREFIX=\${out}";
|
2009-03-03 14:27:40 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
ln -fs $out/lib/fpc/*/ppc386 $out/bin
|
|
|
|
mkdir -p $out/lib/fpc/etc/
|
2009-07-14 11:08:05 +02:00
|
|
|
$out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/lib/fpc/etc/
|
2009-03-03 14:27:40 +01:00
|
|
|
'';
|
2007-08-11 22:55:40 +02:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 14:27:40 +01:00
|
|
|
description = "Free Pascal Compiler from a source distribution";
|
2009-08-25 11:00:19 +02:00
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2007-08-11 22:55:40 +02:00
|
|
|
};
|
2009-03-03 14:27:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
else (import ./default.nix (args // {startFPC = (import ./binary.nix args);}))
|