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-08-23 17:17:59 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-08-23 20:22:00 +0000
commitcf7df9230be3f971d68685c2d5768896037b7633 (patch)
tree14795eccc755ee2885ee8a227fd9b12bfe519609 /pkgs/development/ocaml-modules
parenta65a499ca285390a0704b254529d1cd9faf48b8f (diff)
ocamlPackages.ppx_derivers: init at 1.0
Ppx_derivers is a tiny package whose sole purpose is to allow ppx_deriving and
ppx_type_conv to inter-operate gracefully when linked as part of the same
ocaml-migrate-parsetree driver.

Homepage: https://github.com/diml/ppx_derivers
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/ppx_derivers/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_derivers/default.nix b/pkgs/development/ocaml-modules/ppx_derivers/default.nix
new file mode 100644
index 0000000000000..52c28efcb49ab
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ppx_derivers/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "ppx_derivers is not available for OCaml ${ocaml.version}"
+else
+
+stdenv.mkDerivation rec {
+	name = "ocaml${ocaml.version}-ppx_derivers-${version}";
+	version = "1.0";
+
+	src = fetchFromGitHub {
+		owner = "diml";
+		repo = "ppx_derivers";
+		rev = version;
+		sha256 = "049yy9706lv1li6a1bibkz1qq2ixxbdyhf4f5w9pv71jc3dlpfy8";
+	};
+
+	buildInputs = [ ocaml findlib jbuilder ];
+
+	inherit (jbuilder) installPhase;
+
+	meta = {
+		description = "Shared [@@deriving] plugin registry";
+		license = stdenv.lib.licenses.bsd3;
+		maintainers = [ stdenv.lib.maintainers.vbgl ];
+		inherit (src.meta) homepage;
+		inherit (ocaml.meta) platforms;
+	};
+}