git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.ocp-index : 1.1.2 -> 1.1.4

And split according to ocaml version

commit2cb301d1436f5163d5f6b968700285edbf479cc8 authorThéophane Hufschmitt <theophane.hufschmitt@polytechnique.org> dateThu 21 Jul 2016, 11:18 (10 years ago) parentce90c90
1 file changed+22−11
pkgs/development/tools/ocaml/ocp-index/default.nix+22−11
pkgs/development/tools/ocaml/ocp-index/default.nix+22−11
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
1+{ stdenv, fetchFromGitHub, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
22
33let inherit (stdenv.lib) getVersion versionAtLeast optional; in
44
@@ -7,23 +7,34 @@ assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
77assert versionAtLeast (getVersion ocpIndent) "1.4.2";
88
99let
10− version = "1.1.2";
11− patch402 = fetchurl {
12− url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocp-index/ocp-index.1.1.2/files/ocaml.4.02.patch;
13− sha256 = "1wcpn2pv7h8ia3ybmzdlm8v5hfvq1rgmlj02wwj0yh3vqjvxqvsm";
10+ version = "1.1.4";
11+ ocaml_version = getVersion ocaml;
12+ srcs = {
13+ "4.03.0" = {
14+ rev = "${version}-4.03";
15+ sha256 = "0c6s5radwyvxf9hrq2y9lirk72z686k9yzd0vgzy98yrrp1w56mv";
16+ };
17+ "4.02.3" = {
18+ rev = "${version}-4.02";
19+ sha256 = "057ss3lz754b2pznkb3zda5h65kjgqnvabvfqwqcz4qqxxki2yc8";
20+ };
21+ "4.01.0" = {
22+ rev = "${version}";
23+ sha256 = "106bnc8jhmjnychcl8k3gl9n6b50bc66qc5hqf1wkbkk9kz4vc9d";
24+ };
1425 };
26+
27+ src = fetchFromGitHub ({
28+ owner = "OCamlPro";
29+ repo = "ocp-index";
30+ } // srcs."${ocaml_version}");
1531in
1632
1733stdenv.mkDerivation {
1834
1935 name = "ocp-index-${version}";
2036
21− src = fetchzip {
22− url = "http://github.com/OCamlPro/ocp-index/archive/${version}.tar.gz";
23− sha256 = "0cz0bz5nisc5r23b1w07q2bl489gd09mg8rp9kyq9m6rj669b18l";
24− };
25−
26− patches = optional (versionAtLeast (getVersion ocaml) "4.02") patch402;
37+ inherit src;
2738
2839 buildInputs = [ ocaml findlib ocpBuild opam cmdliner ncurses re libev ]
2940 ++ optional (versionAtLeast (getVersion lambdaTerm) "1.7") lambdaTerm;