git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.rope: 0.5 -> 0.6
commitc890abba5773e25ab10a7824b2f9c3c5436e62f5 authorVincent Laporte <Vincent.Laporte@gmail.com> dateMon 20 Nov 2017, 06:49 (9 years ago) parent7c749ba
1 file changed+27−11
pkgs/development/ocaml-modules/rope/default.nix+27−11
pkgs/development/ocaml-modules/rope/default.nix+27−11
@@ -1,18 +1,34 @@
1−{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, benchmark }:
1+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, jbuilder, benchmark }:
22
3−let version = "0.5"; in
3+let param =
4+ if stdenv.lib.versionAtLeast ocaml.version "4.03"
5+ then {
6+ version = "0.6";
7+ url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6/rope-0.6.tbz";
8+ sha256 = "06pkbnkad2ck50jn59ggwv154yd9vb01abblihvam6p27m4za1pc";
9+ buildInputs = [ jbuilder ];
10+ extra = {
11+ unpackCmd = "tar -xjf $curSrc";
12+ buildPhase = "jbuilder build -p rope";
13+ inherit (jbuilder) installPhase;
14+ };
15+ } else {
16+ version = "0.5";
17+ url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-0.5.tar.gz";
18+ sha256 = "05fr2f5ch2rqhyaj06rv5218sbg99p1m9pq5sklk04hpslxig21f";
19+ buildInputs = [ ocamlbuild ];
20+ extra = { createFindlibDestdir = true; };
21+ };
22+in
423
5−stdenv.mkDerivation {
6− name = "ocaml${ocaml.version}-rope-${version}";
24+stdenv.mkDerivation ({
25+ name = "ocaml${ocaml.version}-rope-${param.version}";
726
8− src = fetchzip {
9− url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-${version}.tar.gz";
10− sha256 = "1i8kzg19jrapl30mq8m91vy09z0r0dl4bnpw24ga96w8pxqf9qhd";
27+ src = fetchurl {
28+ inherit (param) url sha256;
1129 };
1230
13− buildInputs = [ ocaml findlib ocamlbuild benchmark ];
14−
15− createFindlibDestdir = true;
31+ buildInputs = [ ocaml findlib benchmark ] ++ param.buildInputs;
1632
1733 meta = {
1834 homepage = http://rope.forge.ocamlcore.org/;
@@ -21,4 +37,4 @@ stdenv.mkDerivation {
2137 license = stdenv.lib.licenses.lgpl21;
2238 maintainers = with stdenv.lib.maintainers; [ volth ];
2339 };
24−}
40+} // param.extra)