git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #59131 from vbgl/ocaml-uri-2.2
b387dceVincent Laporte
pkgs/development/ocaml-modules/cohttp/default.nix+6−6
@@ -1,27 +1,27 @@
1−{ stdenv, fetchFromGitHub, buildDunePackage
1+{ lib, fetchFromGitHub, buildDunePackage
2, ppx_fields_conv, ppx_sexp_conv, ppx_deriving
2, ppx_fields_conv, ppx_sexp_conv, ppx_deriving
3, base64, fieldslib, jsonm, re, stringext, uri
3, base64, fieldslib, jsonm, re, stringext, uri
4}:
4}:
5
5
6buildDunePackage rec {
6buildDunePackage rec {
7 pname = "cohttp";
7 pname = "cohttp";
8− version = "1.1.1";
8+ version = "2.0.0";
9
9
10 src = fetchFromGitHub {
10 src = fetchFromGitHub {
11 owner = "mirage";
11 owner = "mirage";
12 repo = "ocaml-cohttp";
12 repo = "ocaml-cohttp";
13 rev = "v${version}";
13 rev = "v${version}";
14− sha256 = "1dzd6vy43b7p9xplzg2whylz5br59zxaqywa14b4l377f31gnwq1";
14+ sha256 = "0nz9y7l5s9a2rq5sb1m5705h99wvf4dk3fhcgragwhy5nwwzcya8";
15 };
15 };
16
16
17 buildInputs = [ jsonm ppx_fields_conv ppx_sexp_conv ];
17 buildInputs = [ jsonm ppx_fields_conv ppx_sexp_conv ];
18
18
19− propagatedBuildInputs = [ ppx_deriving base64 fieldslib re stringext uri ];
19+ propagatedBuildInputs = [ base64 fieldslib re stringext uri ];
20
20
21 meta = {
21 meta = {
22 description = "HTTP(S) library for Lwt, Async and Mirage";
22 description = "HTTP(S) library for Lwt, Async and Mirage";
23− license = stdenv.lib.licenses.isc;
23+ license = lib.licenses.isc;
24− maintainers = [ stdenv.lib.maintainers.vbgl ];
24+ maintainers = [ lib.maintainers.vbgl ];
25 inherit (src.meta) homepage;
25 inherit (src.meta) homepage;
26 };
26 };
27}
27}
pkgs/development/ocaml-modules/cohttp/lwt.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv }:
1+{ stdenv, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv, logs }:
2
2
3if !stdenv.lib.versionAtLeast cohttp.version "0.99"
3if !stdenv.lib.versionAtLeast cohttp.version "0.99"
4then cohttp
4then cohttp
@@ -10,5 +10,5 @@ buildDunePackage rec {
10
10
11 buildInputs = [ uri ppx_sexp_conv ];
11 buildInputs = [ uri ppx_sexp_conv ];
12
12
13− propagatedBuildInputs = [ cohttp ocaml_lwt ];
13+ propagatedBuildInputs = [ cohttp ocaml_lwt logs ];
14}
14}
pkgs/development/ocaml-modules/uri/default.nix+23−8
@@ -1,24 +1,39 @@
1−{ stdenv, fetchurl, buildDunePackage, ppx_sexp_conv, ounit
1+{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ounit
2−, re, sexplib, stringext
2+, re, sexplib0, sexplib, stringext
3+, legacy ? false
3}:
4}:
4
5
6+let params =
7+ if legacy then rec {
8+ version = "1.9.6";
9+ archive = version;
10+ sha256 = "1m845rwd70wi4iijkrigyz939m1x84ba70hvv0d9sgk6971w4kz0";
11+ inherit sexplib;
12+ } else rec {
13+ version = "2.2.0";
14+ archive = "v${version}";
15+ sha256 = "1q0xmc93l46dilxclkmai7w952bdi745rhvsx5vissaigcj9wbwi";
16+ sexplib = sexplib0;
17+ }
18+; in
19+
5buildDunePackage rec {
20buildDunePackage rec {
6 pname = "uri";
21 pname = "uri";
7− version = "1.9.6";
22+ inherit (params) version;
8
23
9 src = fetchurl {
24 src = fetchurl {
10− url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
25+ url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-${params.archive}.tbz";
11− sha256 = "1m845rwd70wi4iijkrigyz939m1x84ba70hvv0d9sgk6971w4kz0";
26+ inherit (params) sha256;
12 };
27 };
13
28
14 buildInputs = [ ounit ];
29 buildInputs = [ ounit ];
15− propagatedBuildInputs = [ ppx_sexp_conv re sexplib stringext ];
30+ propagatedBuildInputs = [ ppx_sexp_conv re params.sexplib stringext ];
16 doCheck = true;
31 doCheck = true;
17
32
18 meta = {
33 meta = {
19 homepage = "https://github.com/mirage/ocaml-uri";
34 homepage = "https://github.com/mirage/ocaml-uri";
20 description = "RFC3986 URI parsing library for OCaml";
35 description = "RFC3986 URI parsing library for OCaml";
21− license = stdenv.lib.licenses.isc;
36+ license = lib.licenses.isc;
22− maintainers = [ stdenv.lib.maintainers.vbgl ];
37+ maintainers = [ lib.maintainers.vbgl ];
23 };
38 };
24}
39}
pkgs/top-level/ocaml-packages.nix+6−4
@@ -67,7 +67,7 @@ let
67 };
67 };
68 };
68 };
69 };
69 };
70− uri = uri.override {
70+ uri = uri_1_9.override {
71 inherit (janeStreet_0_9_0) ppx_sexp_conv sexplib;
71 inherit (janeStreet_0_9_0) ppx_sexp_conv sexplib;
72 };
72 };
73 };
73 };
@@ -152,9 +152,7 @@ let
152
152
153 cohttp =
153 cohttp =
154 if lib.versionOlder "4.03" ocaml.version
154 if lib.versionOlder "4.03" ocaml.version
155− then callPackage ../development/ocaml-modules/cohttp {
155+ then callPackage ../development/ocaml-modules/cohttp { }
156− base64 = base64_2;
157− }
158 else cohttp_p4;
156 else cohttp_p4;
159
157
160 cohttp-lwt = callPackage ../development/ocaml-modules/cohttp/lwt.nix { };
158 cohttp-lwt = callPackage ../development/ocaml-modules/cohttp/lwt.nix { };
@@ -757,6 +755,10 @@ let
757 then callPackage ../development/ocaml-modules/uri { }
755 then callPackage ../development/ocaml-modules/uri { }
758 else callPackage ../development/ocaml-modules/uri/legacy.nix { };
756 else callPackage ../development/ocaml-modules/uri/legacy.nix { };
759
757
758+ uri_1_9 = callPackage ../development/ocaml-modules/uri {
759+ legacy = true;
760+ };
761+
760 uri_p4 = callPackage ../development/ocaml-modules/uri/legacy.nix {
762 uri_p4 = callPackage ../development/ocaml-modules/uri/legacy.nix {
761 legacyVersion = true;
763 legacyVersion = true;
762 };
764 };