diff options
author | Théophane Hufschmitt <theophane.hufschmitt@polytechnique.org> | 2016-07-13 14:54:01 +0200 |
---|---|---|
committer | Théophane Hufschmitt <theophane.hufschmitt@polytechnique.org> | 2016-08-04 14:44:34 +0200 |
commit | 7c2ecbe921a77ee210217ee122b446cb511c7a4c (patch) | |
tree | 51dbf1ab19259fc70caaaad3c86fbb7c7253cf7e /pkgs/development | |
parent | f0bbb906e95ee6ff146cad5fdfe568b9653f4b2b (diff) | |
download | nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.tar nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.tar.gz nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.tar.bz2 nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.tar.lz nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.tar.xz nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.tar.zst nixlib-7c2ecbe921a77ee210217ee122b446cb511c7a4c.zip |
ocamlPackages.camlp4 : add version for ocaml_4_03
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/ocaml/camlp4/4_03.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/camlp4/4_03.nix b/pkgs/development/tools/ocaml/camlp4/4_03.nix new file mode 100644 index 000000000000..f05a556c3886 --- /dev/null +++ b/pkgs/development/tools/ocaml/camlp4/4_03.nix @@ -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 []; + }; +} + |