ocamlPackages.uri: 1.9.1 -> 1.9.2

The old version is also kept, under the attribute `uri_p4`.
It is built against `sexplib` version prior to 113.33 and needed by `trv`.
This commit is contained in:
Vincent Laporte
2017-02-19 11:57:24 +01:00
parent 785fbfac65
commit d2a4a84f00
4 changed files with 27 additions and 11 deletions
+20 -7
View File
@@ -1,19 +1,32 @@
{ stdenv, fetchzip, ocaml, findlib, re, sexplib_p4, stringext, ounit }:
{ stdenv, fetchzip, ocaml, findlib, re, stringext, ounit
, sexplib, ppx_sexp_conv
, legacyVersion ? false
, sexplib_p4
}:
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
assert stdenv.lib.versionAtLeast ocaml.version "4";
let version = "1.9.1"; in
with
if legacyVersion
then {
version = "1.9.1";
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
} else {
version = "1.9.2";
sha256 = "137pg8j654x7r0d1664iy2zp3l82nki1kkh921lwdrwc5qqdl6jx";
};
stdenv.mkDerivation {
name = "ocaml-uri-${version}";
name = "ocaml${ocaml.version}-uri-${version}";
src = fetchzip {
url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
inherit sha256;
};
buildInputs = [ ocaml findlib ounit ];
propagatedBuildInputs = [ re sexplib_p4 stringext ];
buildInputs = [ ocaml findlib ounit ]
++ stdenv.lib.optional (!legacyVersion) ppx_sexp_conv;
propagatedBuildInputs = [ re (if legacyVersion then sexplib_p4 else sexplib) stringext ];
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
buildPhase = ''