git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #59131 from vbgl/ocaml-uri-2.2

ocamlPackages.uri: 1.9.6 -> 2.2.0; ocamlPackages.cohttp: 1.1.1 -> 2.0.0

commitb387dced20a2fc7d95768ac21d8772d3e4932ec6 authorVincent Laporte <vbgl@users.noreply.github.com> dateMon 22 Apr 2019, 21:16 (8 years ago) parentc535cb35e93a2f
4 files changed+37−20
pkgs/development/ocaml-modules/cohttp/default.nix+6−6 pkgs/development/ocaml-modules/cohttp/lwt.nix+2−2 pkgs/development/ocaml-modules/uri/default.nix+23−8 pkgs/top-level/ocaml-packages.nix+6−4
pkgs/development/ocaml-modules/cohttp/default.nix+6−6
@@ -1,27 +1,27 @@
1−{ stdenv, fetchFromGitHub, buildDunePackage
1+{ lib, fetchFromGitHub, buildDunePackage
22, ppx_fields_conv, ppx_sexp_conv, ppx_deriving
33, base64, fieldslib, jsonm, re, stringext, uri
44}:
55
66buildDunePackage rec {
77 pname = "cohttp";
8− version = "1.1.1";
8+ version = "2.0.0";
99
1010 src = fetchFromGitHub {
1111 owner = "mirage";
1212 repo = "ocaml-cohttp";
1313 rev = "v${version}";
14− sha256 = "1dzd6vy43b7p9xplzg2whylz5br59zxaqywa14b4l377f31gnwq1";
14+ sha256 = "0nz9y7l5s9a2rq5sb1m5705h99wvf4dk3fhcgragwhy5nwwzcya8";
1515 };
1616
1717 buildInputs = [ jsonm ppx_fields_conv ppx_sexp_conv ];
1818
19− propagatedBuildInputs = [ ppx_deriving base64 fieldslib re stringext uri ];
19+ propagatedBuildInputs = [ base64 fieldslib re stringext uri ];
2020
2121 meta = {
2222 description = "HTTP(S) library for Lwt, Async and Mirage";
23− license = stdenv.lib.licenses.isc;
24− maintainers = [ stdenv.lib.maintainers.vbgl ];
23+ license = lib.licenses.isc;
24+ maintainers = [ lib.maintainers.vbgl ];
2525 inherit (src.meta) homepage;
2626 };
2727}
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 }:
22
33if !stdenv.lib.versionAtLeast cohttp.version "0.99"
44then cohttp
@@ -10,5 +10,5 @@ buildDunePackage rec {
1010
1111 buildInputs = [ uri ppx_sexp_conv ];
1212
13− propagatedBuildInputs = [ cohttp ocaml_lwt ];
13+ propagatedBuildInputs = [ cohttp ocaml_lwt logs ];
1414}
pkgs/development/ocaml-modules/uri/default.nix+23−8
@@ -1,24 +1,39 @@
1−{ stdenv, fetchurl, buildDunePackage, ppx_sexp_conv, ounit
2−, re, sexplib, stringext
1+{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ounit
2+, re, sexplib0, sexplib, stringext
3+, legacy ? false
34}:
45
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+
520buildDunePackage rec {
621 pname = "uri";
7− version = "1.9.6";
22+ inherit (params) version;
823
924 src = fetchurl {
10− url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
11− sha256 = "1m845rwd70wi4iijkrigyz939m1x84ba70hvv0d9sgk6971w4kz0";
25+ url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-${params.archive}.tbz";
26+ inherit (params) sha256;
1227 };
1328
1429 buildInputs = [ ounit ];
15− propagatedBuildInputs = [ ppx_sexp_conv re sexplib stringext ];
30+ propagatedBuildInputs = [ ppx_sexp_conv re params.sexplib stringext ];
1631 doCheck = true;
1732
1833 meta = {
1934 homepage = "https://github.com/mirage/ocaml-uri";
2035 description = "RFC3986 URI parsing library for OCaml";
21− license = stdenv.lib.licenses.isc;
22− maintainers = [ stdenv.lib.maintainers.vbgl ];
36+ license = lib.licenses.isc;
37+ maintainers = [ lib.maintainers.vbgl ];
2338 };
2439}
pkgs/top-level/ocaml-packages.nix+6−4
@@ -67,7 +67,7 @@ let
6767 };
6868 };
6969 };
70− uri = uri.override {
70+ uri = uri_1_9.override {
7171 inherit (janeStreet_0_9_0) ppx_sexp_conv sexplib;
7272 };
7373 };
@@ -152,9 +152,7 @@ let
152152
153153 cohttp =
154154 if lib.versionOlder "4.03" ocaml.version
155− then callPackage ../development/ocaml-modules/cohttp {
156− base64 = base64_2;
157− }
155+ then callPackage ../development/ocaml-modules/cohttp { }
158156 else cohttp_p4;
159157
160158 cohttp-lwt = callPackage ../development/ocaml-modules/cohttp/lwt.nix { };
@@ -757,6 +755,10 @@ let
757755 then callPackage ../development/ocaml-modules/uri { }
758756 else callPackage ../development/ocaml-modules/uri/legacy.nix { };
759757
758+ uri_1_9 = callPackage ../development/ocaml-modules/uri {
759+ legacy = true;
760+ };
761+
760762 uri_p4 = callPackage ../development/ocaml-modules/uri/legacy.nix {
761763 legacyVersion = true;
762764 };