about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/camomile
diff options
context:
space:
mode:
authorThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-05 11:21:46 +0100
committerThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-07 10:08:03 +0100
commit794158fcd54b862f3775bc8b54495a842a250b7b (patch)
tree333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/camomile
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/camomile')
-rw-r--r--pkgs/development/ocaml-modules/camomile/default.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/camomile/default.nix b/pkgs/development/ocaml-modules/camomile/default.nix
index 5e156776f860f..f21e7643afe9e 100644
--- a/pkgs/development/ocaml-modules/camomile/default.nix
+++ b/pkgs/development/ocaml-modules/camomile/default.nix
@@ -1,24 +1,21 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, dune, cppo }:
+{ stdenv, fetchFromGitHub, buildDunePackage, cppo }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "camomile";
 	version = "1.0.1";
-	name = "ocaml${ocaml.version}-camomile-${version}";
 
 	src = fetchFromGitHub {
 		owner = "yoriyuki";
-		repo = "camomile";
-		rev = "${version}";
+		repo = pname;
+		rev = version;
 		sha256 = "1pfxr9kzkpd5bsdqrpxasfxkawwkg4cpx3m1h6203sxi7qv1z3fn";
 	};
 
-	buildInputs = [ ocaml findlib dune cppo ];
+	buildInputs = [ cppo ];
 
 	configurePhase = "ocaml configure.ml --share $out/share/camomile";
 
-	inherit (dune) installPhase;
-
 	meta = {
-		inherit (ocaml.meta) platforms;
 		inherit (src.meta) homepage;
 		maintainers = [ stdenv.lib.maintainers.vbgl ];
 		license = stdenv.lib.licenses.lgpl21;