git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.camlp4 : add version for ocaml_4_03
commit7c2ecbe921a77ee210217ee122b446cb511c7a4c authorThéophane Hufschmitt <theophane.hufschmitt@polytechnique.org> dateWed 13 Jul 2016, 14:54 (10 years ago) parentf0bbb90
2 files changed+48−1
pkgs/development/tools/ocaml/camlp4/4_03.nix+45 pkgs/top-level/all-packages.nix+3−1
pkgs/development/tools/ocaml/camlp4/4_03.nixnew file+45
@@ -0,0 +1,45 @@
1+{stdenv, fetchzip, which, ocaml, ocamlbuild}:
2+let
3+ ocaml_version = (stdenv.lib.getVersion ocaml);
4+ version = "4.03+1";
5+
6+in
7+
8+assert stdenv.lib.versionAtLeast ocaml_version "4.02";
9+
10+stdenv.mkDerivation {
11+ name = "camlp4-${version}";
12+ src = fetchzip {
13+ url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
14+ sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq";
15+ };
16+
17+ buildInputs = [ which ocaml ocamlbuild ];
18+
19+ dontAddPrefix = true;
20+
21+ preConfigure = ''
22+ configureFlagsArray=(
23+ --bindir=$out/bin
24+ --libdir=$out/lib/ocaml/${ocaml_version}/site-lib
25+ --pkgdir=$out/lib/ocaml/${ocaml_version}/site-lib
26+ )
27+ '';
28+
29+ postConfigure = ''
30+ substituteInPlace camlp4/META.in \
31+ --replace +camlp4 $out/lib/ocaml/${ocaml_version}/site-lib/camlp4
32+ '';
33+
34+
35+ makeFlags = "all";
36+
37+ installTargets = "install install-META";
38+
39+ meta = with stdenv.lib; {
40+ description = "A software system for writing extensible parsers for programming languages";
41+ homepage = https://github.com/ocaml/camlp4;
42+ platforms = ocaml.meta.platforms or [];
43+ };
44+}
45+
pkgs/top-level/all-packages.nix+3−1
@@ -5015,7 +5015,9 @@ in
50155015 camlidl = callPackage ../development/tools/ocaml/camlidl { };
50165016
50175017 camlp4 =
5018− if lib.versionOlder "4.02" ocaml_version
5018+ if lib.versionOlder "4.03" ocaml_version
5019+ then callPackage ../development/tools/ocaml/camlp4/4_03.nix { }
5020+ else if lib.versionOlder "4.02" ocaml_version
50195021 then callPackage ../development/tools/ocaml/camlp4 { }
50205022 else null;
50215023