about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix
new file mode 100644
index 000000000000..9a1ef0dd301f
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/sexp.nix
@@ -0,0 +1,16 @@
+{ lib, buildDunePackage, alcotest, cstruct, sexplib }:
+
+if !lib.versionAtLeast (cstruct.version or "1") "3"
+then cstruct
+else
+
+buildDunePackage {
+	pname = "cstruct-sexp";
+	inherit (cstruct) version src meta;
+
+	doCheck = true;
+	buildInputs = [ alcotest ];
+
+	propagatedBuildInputs = [ cstruct sexplib ];
+}
+