Skip to content

Commit d2a4a84

Browse files
committedFeb 19, 2017
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`.
1 parent 785fbfa commit d2a4a84

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed
 

‎pkgs/development/ocaml-modules/cohttp/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, buildOcaml, fetchurl, ocaml, cmdliner, re, uri, fieldslib_p4
1+
{ stdenv, buildOcaml, fetchurl, ocaml, cmdliner, re, uri_p4, fieldslib_p4
22
, sexplib_p4, conduit , stringext, base64, magic-mime, ounit, alcotest
33
, asyncSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
44
, lwt ? null, async_p4 ? null, async_ssl_p4 ? null
@@ -17,7 +17,7 @@ buildOcaml rec {
1717

1818
buildInputs = [ alcotest cmdliner conduit magic-mime ounit lwt ]
1919
++ stdenv.lib.optionals asyncSupport [ async_p4 async_ssl_p4 ];
20-
propagatedBuildInputs = [ re stringext uri fieldslib_p4 sexplib_p4 base64 ];
20+
propagatedBuildInputs = [ re stringext uri_p4 fieldslib_p4 sexplib_p4 base64 ];
2121

2222
buildFlags = "PREFIX=$(out)";
2323

‎pkgs/development/ocaml-modules/conduit/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, buildOcaml, fetchurl, ocaml, sexplib_p4, stringext, uri, cstruct, ipaddr
1+
{ stdenv, buildOcaml, fetchurl, ocaml, sexplib_p4, stringext, uri_p4, cstruct, ipaddr
22
, asyncSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
33
, async_p4 ? null, async_ssl_p4 ? null, lwt ? null
44
}:
@@ -12,7 +12,7 @@ buildOcaml rec {
1212
sha256 = "5cf1a46aa0254345e5143feebe6b54bdef96314e9987f44e69f24618d620faa1";
1313
};
1414

15-
propagatedBuildInputs = [ sexplib_p4 stringext uri cstruct ipaddr ];
15+
propagatedBuildInputs = [ sexplib_p4 stringext uri_p4 cstruct ipaddr ];
1616
buildInputs = stdenv.lib.optional (lwt != null) lwt
1717
++ stdenv.lib.optional (asyncSupport && async_p4 != null) async_p4
1818
++ stdenv.lib.optional (asyncSupport && async_ssl_p4 != null) async_ssl_p4;

‎pkgs/development/ocaml-modules/uri/default.nix

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
1-
{ stdenv, fetchzip, ocaml, findlib, re, sexplib_p4, stringext, ounit }:
2-
3-
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
4-
5-
let version = "1.9.1"; in
1+
{ stdenv, fetchzip, ocaml, findlib, re, stringext, ounit
2+
, sexplib, ppx_sexp_conv
3+
, legacyVersion ? false
4+
, sexplib_p4
5+
}:
6+
7+
assert stdenv.lib.versionAtLeast ocaml.version "4";
8+
9+
with
10+
if legacyVersion
11+
then {
12+
version = "1.9.1";
13+
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
14+
} else {
15+
version = "1.9.2";
16+
sha256 = "137pg8j654x7r0d1664iy2zp3l82nki1kkh921lwdrwc5qqdl6jx";
17+
};
618

719
stdenv.mkDerivation {
8-
name = "ocaml-uri-${version}";
20+
name = "ocaml${ocaml.version}-uri-${version}";
921

1022
src = fetchzip {
1123
url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
12-
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
24+
inherit sha256;
1325
};
1426

15-
buildInputs = [ ocaml findlib ounit ];
16-
propagatedBuildInputs = [ re sexplib_p4 stringext ];
27+
buildInputs = [ ocaml findlib ounit ]
28+
++ stdenv.lib.optional (!legacyVersion) ppx_sexp_conv;
29+
propagatedBuildInputs = [ re (if legacyVersion then sexplib_p4 else sexplib) stringext ];
1730

1831
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
1932
buildPhase = ''

‎pkgs/top-level/ocaml-packages.nix

+3
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ let
510510
uunf = callPackage ../development/ocaml-modules/uunf { };
511511

512512
uri = callPackage ../development/ocaml-modules/uri { };
513+
uri_p4 = callPackage ../development/ocaml-modules/uri {
514+
legacyVersion = true;
515+
};
513516

514517
uuseg = callPackage ../development/ocaml-modules/uuseg { };
515518
uutf = callPackage ../development/ocaml-modules/uutf { };

0 commit comments

Comments
 (0)
Please sign in to comment.