2010-07-28 11:55:54 +00:00
|
|
|
{ stdenv, fetchurl, gawk }:
|
2009-03-03 13:27:40 +00:00
|
|
|
|
2010-07-28 11:55:54 +00:00
|
|
|
let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in
|
2009-03-03 13:27:40 +00:00
|
|
|
|
2009-07-14 09:08:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-01 01:21:28 +00:00
|
|
|
version = "3.0.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "fpc";
|
2007-08-11 20:55:40 +00:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2013-07-14 00:09:34 +00:00
|
|
|
url = "mirror://sourceforge/freepascal/fpcbuild-${version}.tar.gz";
|
2016-01-01 01:21:28 +00:00
|
|
|
sha256 = "1v40bjp0kvsi8y0mndqvvhnsqjfssl2w6wpfww51j4rxblfkp4fm";
|
2009-03-03 13:27:40 +00:00
|
|
|
};
|
2007-08-11 20:55:40 +00:00
|
|
|
|
2010-07-28 11:55:54 +00:00
|
|
|
buildInputs = [ startFPC gawk ];
|
2007-08-11 20:55:40 +00:00
|
|
|
|
2009-03-03 13:27:40 +00:00
|
|
|
preConfigure =
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.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 15:10:09 +00:00
|
|
|
|
2014-08-31 18:47:45 +00:00
|
|
|
makeFlags = "NOGDB=1 FPC=${startFPC}/bin/fpc";
|
2009-02-26 15:14:17 +00:00
|
|
|
|
2007-08-11 20:55:40 +00:00
|
|
|
installFlags = "INSTALL_PREFIX=\${out}";
|
2018-08-19 22:20:07 +00:00
|
|
|
|
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 09:08:05 +00:00
|
|
|
$out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/lib/fpc/etc/
|
2009-03-03 13:27:40 +00:00
|
|
|
'';
|
2007-08-11 20:55:40 +00:00
|
|
|
|
2014-08-31 18:47:45 +00:00
|
|
|
passthru = {
|
|
|
|
bootstrap = startFPC;
|
|
|
|
};
|
|
|
|
|
2018-08-19 22:20:07 +00:00
|
|
|
meta = with stdenv.lib; {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "Free Pascal Compiler from a source distribution";
|
2018-08-19 22:20:07 +00:00
|
|
|
homepage = https://www.freepascal.org;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = with licenses; [ gpl2 lgpl2 ];
|
|
|
|
platforms = platforms.linux;
|
2014-08-31 18:47:45 +00:00
|
|
|
inherit version;
|
2007-08-11 20:55:40 +00:00
|
|
|
};
|
2009-03-03 13:27:40 +00:00
|
|
|
}
|