about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-03-18 12:58:49 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-03-18 12:58:49 +0000
commit959064cfbea7fc0cf5d290c79f4b6aca832193fd (patch)
treead0d02602d9c2792671e73b1572e16751e48fb49 /pkgs/development/ocaml-modules
parent7d81be90c2aad2544e369dd1b09cfb53bad43d4d (diff)
downloadnixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.tar
nixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.tar.gz
nixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.tar.bz2
nixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.tar.lz
nixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.tar.xz
nixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.tar.zst
nixlib-959064cfbea7fc0cf5d290c79f4b6aca832193fd.zip
ocamlPackages.ppx_deriving_yojson: init at 3.0
deriving Yojson is a ppx_deriving plugin that generates JSON serializers and
deserializers that use the Yojson library from an OCaml type definition.

Homepage: https://github.com/whitequark/ppx_deriving_yojson
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
new file mode 100644
index 000000000000..69276fb5a7d6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg, cppo
+, ppx_import, ppx_deriving, yojson, ounit
+}:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-ppx_deriving_yojson-${version}";
+  version = "3.0";
+
+  src = fetchFromGitHub {
+    owner = "whitequark";
+    repo = "ppx_deriving_yojson";
+    rev = "v${version}";
+    sha256 = "1id1a29qq0ax9qp98b5hv6p2q2r0vp4fbkkwzm1bxdhnasw97msk";
+  };
+
+  buildInputs = [ ocaml findlib ocamlbuild opam cppo ounit ppx_import ];
+
+  propagatedBuildInputs = [ ppx_deriving yojson ];
+
+  inherit (topkg) installPhase;
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = {
+    description = "A Yojson codec generator for OCaml >= 4.02.";
+    inherit (src.meta) homepage;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    inherit (ocaml.meta) platforms;
+  };
+}