diff --git a/pkgs/development/ocaml-modules/uri/default.nix b/pkgs/development/ocaml-modules/uri/default.nix index fd18413826b6..e17e99cdc67c 100644 --- a/pkgs/development/ocaml-modules/uri/default.nix +++ b/pkgs/development/ocaml-modules/uri/default.nix @@ -1,5 +1,5 @@ -{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ounit -, re, sexplib0, stringext +{ lib, fetchurl, buildDunePackage, ounit +, re, stringext }: buildDunePackage rec { @@ -12,7 +12,7 @@ buildDunePackage rec { }; buildInputs = [ ounit ]; - propagatedBuildInputs = [ ppx_sexp_conv re sexplib0 stringext ]; + propagatedBuildInputs = [ re stringext ]; doCheck = true; meta = { diff --git a/pkgs/development/ocaml-modules/uri/sexp.nix b/pkgs/development/ocaml-modules/uri/sexp.nix new file mode 100644 index 000000000000..c6f979e5a3e7 --- /dev/null +++ b/pkgs/development/ocaml-modules/uri/sexp.nix @@ -0,0 +1,13 @@ +{ lib, ocaml, buildDunePackage, uri, ounit, ppx_sexp_conv, sexplib0 }: + +if !lib.versionAtLeast ocaml.version "4.04" +then throw "uri-sexp is not available for OCaml ${ocaml.version}" +else + +buildDunePackage { + pname = "uri-sexp"; + inherit (uri) version src doCheck meta; + + buildInputs = [ ounit ]; + propagatedBuildInputs = [ ppx_sexp_conv sexplib0 uri ]; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 682215117069..16dd32a8a7a6 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -768,6 +768,8 @@ let then callPackage ../development/ocaml-modules/uri { } else callPackage ../development/ocaml-modules/uri/legacy.nix { }; + uri-sexp = callPackage ../development/ocaml-modules/uri/sexp.nix { }; + uri_p4 = callPackage ../development/ocaml-modules/uri/legacy.nix { legacyVersion = true; };