about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix b/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix
new file mode 100644
index 000000000000..61aa01fad8ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/uri/sexp.nix
@@ -0,0 +1,16 @@
+{ lib, ocaml, buildDunePackage, uri, ounit, ppx_sexp_conv, sexplib0 }:
+
+if lib.versionOlder ocaml.version "4.04"
+then throw "uri-sexp is not available for OCaml ${ocaml.version}"
+else
+
+buildDunePackage {
+  pname = "uri-sexp";
+  inherit (uri) version src meta;
+
+  duneVersion = "3";
+
+  checkInputs = [ ounit ];
+  propagatedBuildInputs = [ ppx_sexp_conv sexplib0 uri ];
+  doCheck = lib.versionAtLeast ocaml.version "4.08";
+}