summary refs log tree commit diff
path: root/pkgs/development/tools/ocaml/ocp-index
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2018-06-26 05:24:10 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2018-06-26 20:14:57 +0000
commit0d1b5285c91f93641f485da339de3382463c347c (patch)
tree0992a0f4abf995a0acae9df0868dfa68c2c59d7d /pkgs/development/tools/ocaml/ocp-index
parentfd018bdaddf87c3bcccdf84f9698447695aed35d (diff)
downloadnixpkgs-0d1b5285c91f93641f485da339de3382463c347c.tar
nixpkgs-0d1b5285c91f93641f485da339de3382463c347c.tar.gz
nixpkgs-0d1b5285c91f93641f485da339de3382463c347c.tar.bz2
nixpkgs-0d1b5285c91f93641f485da339de3382463c347c.tar.lz
nixpkgs-0d1b5285c91f93641f485da339de3382463c347c.tar.xz
nixpkgs-0d1b5285c91f93641f485da339de3382463c347c.tar.zst
nixpkgs-0d1b5285c91f93641f485da339de3382463c347c.zip
ocamlPackages.ocp-index: 1.1.5 -> 1.1.6
Diffstat (limited to 'pkgs/development/tools/ocaml/ocp-index')
-rw-r--r--pkgs/development/tools/ocaml/ocp-index/default.nix32
1 files changed, 8 insertions, 24 deletions
diff --git a/pkgs/development/tools/ocaml/ocp-index/default.nix b/pkgs/development/tools/ocaml/ocp-index/default.nix
index 669d9789427..8f6062adb06 100644
--- a/pkgs/development/tools/ocaml/ocp-index/default.nix
+++ b/pkgs/development/tools/ocaml/ocp-index/default.nix
@@ -1,39 +1,23 @@
-{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ocp-build, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
+{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder, ocp-build, ocpIndent, cmdliner, re }:
 
-let inherit (stdenv.lib) getVersion versionAtLeast optional; in
+stdenv.mkDerivation rec {
 
-assert versionAtLeast (getVersion ocaml) "4";
-assert versionAtLeast (getVersion ocp-build) "1.99.13-beta";
-assert versionAtLeast (getVersion ocpIndent) "1.4.2";
-
-let
-  version = "1.1.5";
-in
-
-stdenv.mkDerivation {
-
-  name = "ocp-index-${version}";
+  version = "1.1.6";
+  name = "ocaml${ocaml.version}-ocp-index-${version}";
 
   src = fetchFromGitHub {
     owner = "OCamlPro";
     repo = "ocp-index";
     rev = version;
-    sha256 = "0gir0fm8mq609371kmwpsqfvpfx2b26ax3f9rg5fjf5r0bjk9pqd";
+    sha256 = "0p367aphz9w71qbm3y47qwhgqmyai28l96i1ifb6kg7awph5qmj3";
   };
 
-  patches = [ (fetchpatch {
-    url = https://github.com/OCamlPro/ocp-index/commit/618872a0980d077857a63d502eadbbf0d1b05c0f.diff;
-    sha256 = "07snnydczkzapradh1c22ggv9vaff67nc36pi3218azb87mb1p7z";
-  }) ];
-
-  buildInputs = [ ocaml findlib ocp-build opam cmdliner ncurses re libev ]
-  ++ optional (versionAtLeast (getVersion lambdaTerm) "1.7") lambdaTerm;
+  buildInputs = [ ocaml findlib jbuilder ocp-build cmdliner re ];
   propagatedBuildInputs = [ ocpIndent ];
 
-  createFindlibDestdir = true;
+  buildPhase = "jbuilder build -p ocp-index";
 
-  preBuild = "export TERM=xterm";
-  postInstall = "mv $out/lib/{ocp-index,ocaml/${getVersion ocaml}/site-lib/}";
+  inherit (jbuilder) installPhase;
 
   meta = {
     homepage = http://typerex.ocamlpro.com/ocp-index.html;