ocamlPackages.camlp4 : add version for ocaml_4_03
This commit is contained in:
parent
f0bbb906e9
commit
7c2ecbe921
2 changed files with 48 additions and 1 deletions
45
pkgs/development/tools/ocaml/camlp4/4_03.nix
Normal file
45
pkgs/development/tools/ocaml/camlp4/4_03.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{stdenv, fetchzip, which, ocaml, ocamlbuild}:
|
||||
let
|
||||
ocaml_version = (stdenv.lib.getVersion ocaml);
|
||||
version = "4.03+1";
|
||||
|
||||
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 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq";
|
||||
};
|
||||
|
||||
buildInputs = [ which ocaml ocamlbuild ];
|
||||
|
||||
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 or [];
|
||||
};
|
||||
}
|
||||
|
|
@ -5015,7 +5015,9 @@ in
|
|||
camlidl = callPackage ../development/tools/ocaml/camlidl { };
|
||||
|
||||
camlp4 =
|
||||
if lib.versionOlder "4.02" ocaml_version
|
||||
if lib.versionOlder "4.03" ocaml_version
|
||||
then callPackage ../development/tools/ocaml/camlp4/4_03.nix { }
|
||||
else if lib.versionOlder "4.02" ocaml_version
|
||||
then callPackage ../development/tools/ocaml/camlp4 { }
|
||||
else null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue