git.iko.soy/typeable/nixpkgs
on master help sign in
camlp4: fix for OCaml-4.03
commit731b616fdbb7b3b0d753f5ac05926de33d17c177 authorVincent Laporte <Vincent.Laporte@gmail.com> dateSat 8 Oct 2016, 08:45 (10 years ago) parent03c2b44
3 files changed+16−53
pkgs/development/tools/ocaml/camlp4/4_03.nix−42 pkgs/development/tools/ocaml/camlp4/default.nix+14−7 pkgs/top-level/ocaml-packages.nix+2−4
pkgs/development/tools/ocaml/camlp4/4_03.nixdeleted−42
@@ -1,42 +0,0 @@
1−{stdenv, fetchzip, which, ocaml, ocamlbuild}:
2−
3−assert stdenv.lib.versionAtLeast ocaml.version "4.02";
4−
5−stdenv.mkDerivation {
6− name = "camlp4-${version}";
7− version = "4.03+1";
8−
9− src = fetchzip {
10− url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
11− sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq";
12− };
13−
14− buildInputs = [ which ocaml ocamlbuild ];
15−
16− dontAddPrefix = true;
17−
18− preConfigure = ''
19− configureFlagsArray=(
20− --bindir=$out/bin
21− --libdir=$out/lib/ocaml/${ocaml.version}/site-lib
22− --pkgdir=$out/lib/ocaml/${ocaml.version}/site-lib
23− )
24− '';
25−
26− postConfigure = ''
27− substituteInPlace camlp4/META.in \
28− --replace +camlp4 $out/lib/ocaml/${ocaml.version}/site-lib/camlp4
29− '';
30−
31−
32− makeFlags = "all";
33−
34− installTargets = "install install-META";
35−
36− meta = with stdenv.lib; {
37− description = "A software system for writing extensible parsers for programming languages";
38− homepage = https://github.com/ocaml/camlp4;
39− platforms = ocaml.meta.platforms or [];
40− };
41−}
42−
pkgs/development/tools/ocaml/camlp4/default.nix+14−7
@@ -1,17 +1,25 @@
1−{stdenv, fetchzip, which, ocaml}:
2−
3−assert stdenv.lib.versionAtLeast ocaml.version "4.02";
1+{ stdenv, fetchzip, which, ocaml, ocamlbuild }:
2+
3+let param = {
4+ "4.02.3" = {
5+ version = "4.02+6";
6+ sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj"; };
7+ "4.03.0" = {
8+ version = "4.03+1";
9+ sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq"; };
10+ }."${ocaml.version}";
11+in
412
513stdenv.mkDerivation rec {
614 name = "camlp4-${version}";
7− version = "4.02+6";
15+ inherit (param) version;
816
917 src = fetchzip {
1018 url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
11− sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj";
19+ inherit (param) sha256;
1220 };
1321
14− buildInputs = [ which ocaml ];
22+ buildInputs = [ which ocaml ocamlbuild ];
1523
1624 dontAddPrefix = true;
1725
@@ -28,7 +36,6 @@ stdenv.mkDerivation rec {
2836 --replace +camlp4 $out/lib/ocaml/${ocaml.version}/site-lib/camlp4
2937 '';
3038
31−
3239 makeFlags = "all";
3340
3441 installTargets = "install install-META";
pkgs/top-level/ocaml-packages.nix+2−4
@@ -58,9 +58,7 @@ let
5858 camlidl = callPackage ../development/tools/ocaml/camlidl { };
5959
6060 camlp4 =
61− if lib.versionOlder "4.03" ocaml.version
62− then callPackage ../development/tools/ocaml/camlp4/4_03.nix { }
63− else if lib.versionOlder "4.02" ocaml.version
61+ if lib.versionOlder "4.02" ocaml.version
6462 then callPackage ../development/tools/ocaml/camlp4 { }
6563 else null;
6664
@@ -707,7 +705,7 @@ in rec
707705
708706 ocamlPackages_4_02 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix { }) (self: super: { });
709707
710− ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix { }) (self: super: { });
708+ ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.03.nix { }) (self: super: { });
711709
712710 ocamlPackages_latest = ocamlPackages_4_03;
713711