summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix15
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix
new file mode 100644
index 00000000000..8f32887c5bf
--- /dev/null
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix
@@ -0,0 +1,15 @@
+{ stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler
+, js_of_ocaml, ppx_deriving
+}:
+
+stdenv.mkDerivation rec {
+	name = "js_of_ocaml-ppx_deriving_json-${version}";
+
+	inherit (js_of_ocaml-compiler) version src installPhase meta;
+
+	buildInputs = [ ocaml findlib jbuilder ];
+
+	propagatedBuildInputs = [ js_of_ocaml ppx_deriving ];
+
+	buildPhase = "jbuilder build -p js_of_ocaml-ppx_deriving_json";
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 7ac8508d889..e7dba3e8855 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -330,6 +330,8 @@ let
 
     js_of_ocaml-ppx = callPackage ../development/tools/ocaml/js_of_ocaml/ppx.nix {};
 
+    js_of_ocaml-ppx_deriving_json = callPackage ../development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix {};
+
     jsonm = callPackage ../development/ocaml-modules/jsonm { };
 
     lablgl = callPackage ../development/ocaml-modules/lablgl { };