summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMarco Maggesi <1809783+maggesi@users.noreply.github.com>2018-10-05 14:14:25 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2018-10-06 15:49:09 +0000
commit9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10 (patch)
treef0d33af26ccabf0bdddc06951b6cd1902653e9ef /pkgs
parent171752daee9aa2b4049d70a7cebe6a72d2838f90 (diff)
downloadnixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.tar
nixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.tar.gz
nixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.tar.bz2
nixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.tar.lz
nixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.tar.xz
nixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.tar.zst
nixlib-9a5f7b1630c138a82cb9ae0d6a513c4358c1dc10.zip
hol_light: 2017-07-06 -> 2018-09-30
Also handle compatibility with newer version of OCaml (depend on num
library as needed).
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/science/logic/hol_light/default.nix39
-rw-r--r--pkgs/top-level/ocaml-packages.nix1
2 files changed, 23 insertions, 17 deletions
diff --git a/pkgs/applications/science/logic/hol_light/default.nix b/pkgs/applications/science/logic/hol_light/default.nix
index a1779baf5f82..91be7dca1173 100644
--- a/pkgs/applications/science/logic/hol_light/default.nix
+++ b/pkgs/applications/science/logic/hol_light/default.nix
@@ -1,32 +1,37 @@
-{ stdenv, fetchFromGitHub, fetchpatch, ocaml, camlp5 }:
+{ stdenv, fetchFromGitHub, ocaml, num, camlp5 }:
 
 let
-  start_script = ''
-    #!/bin/sh
-    cd "$out/lib/hol_light"
-    exec ${ocaml}/bin/ocaml -I \`${camlp5}/bin/camlp5 -where\` -init make.ml
-  '';
+  load_num =
+    if num == null then "" else
+      ''
+        -I ${num}/lib/ocaml/${ocaml.version}/site-lib/num \
+        -I ${num}/lib/ocaml/${ocaml.version}/site-lib/top-num \
+        -I ${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs \
+      '';
+
+  start_script =
+    ''
+      #!/bin/sh
+      cd $out/lib/hol_light
+      exec ${ocaml}/bin/ocaml \
+        -I \`${camlp5}/bin/camlp5 -where\` \
+        ${load_num} \
+        -init make.ml
+    '';
 in
 
 stdenv.mkDerivation {
-  name     = "hol_light-2017-07-06";
+  name     = "hol_light-2018-09-30";
 
   src = fetchFromGitHub {
     owner  = "jrh13";
     repo   = "hol-light";
-    rev    = "0ad8cbdb4de08a38dac600f352555e8454499faa";
-    sha256 = "0px9hl1b0mkyqv84j0si1zdq4066ffdrhzp27p2iah9l8ynbvpaq";
+    rev    = "27e09dd27834de46e917057710e9d8ded51a4c9f";
+    sha256 = "1p0rm08wnc2lsrh3xzhlq3zdhzqcv1lbqnkwx3aybrqhbg1ixc1d";
   };
 
   buildInputs = [ ocaml camlp5 ];
-
-  patches = [ (fetchpatch {
-      url = https://github.com/girving/hol-light/commit/f80524bad61fd6f6facaa42153b2e29d1eab4658.patch;
-      sha256 = "1563wp597vakhmsgg8940dpirzzfvvxqp75x3dnx20rvmi2n2xw0";
-    })
-  ];
-
-  postPatch = "cp pa_j_3.1x_{6,7}.xx.ml";
+  propagatedBuildInputs = [ num ];
 
   installPhase = ''
     mkdir -p "$out/lib/hol_light" "$out/bin"
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index fab79bd7b729..a6214abbc367 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -1043,6 +1043,7 @@ let
     };
 
     hol_light = callPackage ../applications/science/logic/hol_light {
+      inherit num;
       camlp5 = camlp5_strict;
     };