summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane.hufschmitt@polytechnique.org>2016-07-21 11:18:06 +0200
committerThéophane Hufschmitt <theophane.hufschmitt@polytechnique.org>2016-08-04 14:44:35 +0200
commit2cb301d1436f5163d5f6b968700285edbf479cc8 (patch)
tree6871e937317c9a3b358d4c0fe9b521aea3177b75 /pkgs/development
parentce90c9027482175d7bc1ff9b51088dc008a9c02c (diff)
downloadnixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.tar
nixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.tar.gz
nixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.tar.bz2
nixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.tar.lz
nixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.tar.xz
nixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.tar.zst
nixlib-2cb301d1436f5163d5f6b968700285edbf479cc8.zip
ocamlPackages.ocp-index : 1.1.2 -> 1.1.4
And split according to ocaml version
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/ocaml/ocp-index/default.nix33
1 files changed, 22 insertions, 11 deletions
diff --git a/pkgs/development/tools/ocaml/ocp-index/default.nix b/pkgs/development/tools/ocaml/ocp-index/default.nix
index 37f90c41100a..5ca1aed810cf 100644
--- a/pkgs/development/tools/ocaml/ocp-index/default.nix
+++ b/pkgs/development/tools/ocaml/ocp-index/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
 
 let inherit (stdenv.lib) getVersion versionAtLeast optional; in
 
@@ -7,23 +7,34 @@ assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
 assert versionAtLeast (getVersion ocpIndent) "1.4.2";
 
 let
-  version = "1.1.2";
-  patch402 = fetchurl {
-    url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocp-index/ocp-index.1.1.2/files/ocaml.4.02.patch;
-    sha256 = "1wcpn2pv7h8ia3ybmzdlm8v5hfvq1rgmlj02wwj0yh3vqjvxqvsm";
+  version = "1.1.4";
+  ocaml_version = getVersion ocaml;
+  srcs = {
+    "4.03.0" = {
+      rev = "${version}-4.03";
+      sha256 = "0c6s5radwyvxf9hrq2y9lirk72z686k9yzd0vgzy98yrrp1w56mv";
+    };
+    "4.02.3" = {
+      rev = "${version}-4.02";
+      sha256 = "057ss3lz754b2pznkb3zda5h65kjgqnvabvfqwqcz4qqxxki2yc8";
+    };
+    "4.01.0" = {
+      rev = "${version}";
+      sha256 = "106bnc8jhmjnychcl8k3gl9n6b50bc66qc5hqf1wkbkk9kz4vc9d";
+    };
   };
+
+  src = fetchFromGitHub ({
+    owner = "OCamlPro";
+    repo = "ocp-index";
+  } // srcs."${ocaml_version}");
 in
 
 stdenv.mkDerivation {
 
   name = "ocp-index-${version}";
 
-  src = fetchzip {
-    url = "http://github.com/OCamlPro/ocp-index/archive/${version}.tar.gz";
-    sha256 = "0cz0bz5nisc5r23b1w07q2bl489gd09mg8rp9kyq9m6rj669b18l";
-  };
-
-  patches = optional (versionAtLeast (getVersion ocaml) "4.02") patch402;
+  inherit src;
 
   buildInputs = [ ocaml findlib ocpBuild opam cmdliner ncurses re libev ]
   ++ optional (versionAtLeast (getVersion lambdaTerm) "1.7") lambdaTerm;