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