2010-07-28 12:55:54 +01:00
|
|
|
{ stdenv, fetchurl, gawk }:
|
2009-03-03 13:27:40 +00:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in
|
2009-03-03 13:27:40 +00:00
|
|
|
|
2009-07-14 10:08:05 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2011-05-25 09:45:08 +01:00
|
|
|
version = "2.4.4";
|
2009-07-14 10:08:05 +01:00
|
|
|
name = "fpc-${version}";
|
2007-08-11 21:55:40 +01:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2011-05-25 09:45:08 +01:00
|
|
|
url = "http://downloads.sourceforge.net/sourceforge/freepascal/Source/${version}/fpcbuild-${version}.tar.gz";
|
|
|
|
sha256 = "ecdbc150eecc33f5734e62f1a3507421db8eba6d9074c0c5519a8fc8ffe46924";
|
2009-03-03 13:27:40 +00:00
|
|
|
};
|
2007-08-11 21:55:40 +01:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
buildInputs = [ startFPC gawk ];
|
2007-08-11 21:55:40 +01:00
|
|
|
|
2009-03-03 13:27:40 +00:00
|
|
|
preConfigure =
|
2010-07-28 12:55:54 +01:00
|
|
|
if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
|
2009-03-03 13:27:40 +00:00
|
|
|
sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
|
2010-11-10 16:38:22 +00:00
|
|
|
sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
|
2009-03-03 13:27:40 +00:00
|
|
|
'' else "";
|
2008-04-08 16:10:09 +01:00
|
|
|
|
2009-02-26 15:14:17 +00:00
|
|
|
makeFlags = "NOGDB=1";
|
|
|
|
|
2007-08-11 21:55:40 +01:00
|
|
|
installFlags = "INSTALL_PREFIX=\${out}";
|
2009-03-03 13:27:40 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2010-01-15 10:43:21 +00:00
|
|
|
for i in $out/lib/fpc/*/ppc*; do
|
|
|
|
ln -fs $i $out/bin/$(basename $i)
|
|
|
|
done
|
2009-03-03 13:27:40 +00:00
|
|
|
mkdir -p $out/lib/fpc/etc/
|
2009-07-14 10:08:05 +01:00
|
|
|
$out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/lib/fpc/etc/
|
2009-03-03 13:27:40 +00:00
|
|
|
'';
|
2007-08-11 21:55:40 +01:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "Free Pascal Compiler from a source distribution";
|
2009-08-25 10:00:19 +01:00
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2007-08-11 21:55:40 +01:00
|
|
|
};
|
2009-03-03 13:27:40 +00:00
|
|
|
}
|