summary refs log tree commit diff
path: root/pkgs/development/compilers/fpc/default.nix
blob: 0d2f1fb525d763fe6ec3ae0c24a9a71b413b173f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
args:
if ((args ? startFPC) && (args.startFPC != null))
	then 
with args;
stdenv.mkDerivation {
  name = "fpc-2.2.0";

  src = fetchurl {
		url = ftp://freepascal.stack.nl/pub/fpc/dist/source-2.2.0/fpcbuild-2.2.0.tar.gz;
		sha256 = "0pvsdmimknkgy8jgdz9kd7w5bs9fy5ynrgswpk0ib6x0y26zxijm";
	};

  buildInputs = [startFPC gawk];

  installFlags = "INSTALL_PREFIX=\${out}";
  postInstall = "ln -fs $out/lib/fpc/*/ppc386 $out/bin;
	mkdir -p $out/lib/fpc/etc/ ;
	$out/lib/fpc/*/samplecfg $out/lib/fpc/2.2.0 $out/lib/fpc/etc/;";

  meta = {
    description = "
	Free Pascal Compiler from a source distribution.
";
  };
} else (import ./default.nix (args // {startFPC = (import ./binary.nix args);}))