summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/eliom
diff options
context:
space:
mode:
authorFlorent Becker <florent.becker@ens-lyon.org>2016-05-31 18:36:45 +0200
committerFlorent Becker <florent.becker@ens-lyon.org>2016-05-31 19:10:08 +0200
commit7395020b657ccec75881d62d05a8997cadaf3304 (patch)
tree4f94d17790497945d361f514444cb5def78d27f4 /pkgs/development/ocaml-modules/eliom
parent71888e7973a967bdfdfd41cdc1632e8b659752cd (diff)
downloadnixlib-7395020b657ccec75881d62d05a8997cadaf3304.tar
nixlib-7395020b657ccec75881d62d05a8997cadaf3304.tar.gz
nixlib-7395020b657ccec75881d62d05a8997cadaf3304.tar.bz2
nixlib-7395020b657ccec75881d62d05a8997cadaf3304.tar.lz
nixlib-7395020b657ccec75881d62d05a8997cadaf3304.tar.xz
nixlib-7395020b657ccec75881d62d05a8997cadaf3304.tar.zst
nixlib-7395020b657ccec75881d62d05a8997cadaf3304.zip
allow eliom with ocaml-4.01
Diffstat (limited to 'pkgs/development/ocaml-modules/eliom')
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix
index 1147c3054170..219f104271d3 100644
--- a/pkgs/development/ocaml-modules/eliom/default.nix
+++ b/pkgs/development/ocaml-modules/eliom/default.nix
@@ -3,7 +3,11 @@
   ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp,
   reactivedata, opam, ppx_tools, camlp4}:
 
-assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
+let ocamlVersion = (stdenv.lib.getVersion ocaml);
+  in
+
+(
+assert stdenv.lib.versionAtLeast ocamlVersion "4";
 
 stdenv.mkDerivation rec
 {
@@ -25,9 +29,11 @@ stdenv.mkDerivation rec
                             calendar cryptokit ocamlnet ocaml_react ocaml_ssl
                             ocaml_pcre ];
 
+  preConfigure = stdenv.lib.optionalString (!stdenv.lib.versionAtLeast ocamlVersion "4.02") ''
+      export PPX=false
+    '';
+
   installPhase =
-  let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
-  in
   ''opam-installer --script --prefix=$out ${pname}.install > install.sh
     sh install.sh
     ln -s $out/lib/${pname} $out/lib/ocaml/${ocamlVersion}/site-lib/
@@ -55,4 +61,4 @@ stdenv.mkDerivation rec
 
     maintainers = [ stdenv.lib.maintainers.gal_bolle ];
   };
-}
+})