3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix
Samuel Rivas d516f12dba camlp4: 4.02.0+1 -> 4.02+6
* Remove unneeded substitution in postConfigure
   This was fixed here: 81ed5cf2e8

 * camlp4: use fetchzip

It is considered more reliable than fetchurl
2015-08-06 08:06:16 +02:00

45 lines
1 KiB
Nix

{stdenv, fetchzip, which, ocaml}:
let
ocaml_version = (stdenv.lib.getVersion ocaml);
version = "4.02+6";
in
assert stdenv.lib.versionAtLeast ocaml_version "4.02";
stdenv.mkDerivation {
name = "camlp4-${version}";
src = fetchzip {
url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj";
};
buildInputs = [ which ocaml ];
dontAddPrefix = true;
preConfigure = ''
configureFlagsArray=(
--bindir=$out/bin
--libdir=$out/lib/ocaml/${ocaml_version}/site-lib
--pkgdir=$out/lib/ocaml/${ocaml_version}/site-lib
)
'';
postConfigure = ''
substituteInPlace camlp4/META.in \
--replace +camlp4 $out/lib/ocaml/${ocaml_version}/site-lib/camlp4
'';
makeFlags = "all";
installTargets = "install install-META";
meta = with stdenv.lib; {
description = "A software system for writing extensible parsers for programming languages";
homepage = https://github.com/ocaml/camlp4;
platforms = ocaml.meta.platforms;
};
}