summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/git
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/git
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
downloadnixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.gz
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.bz2
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.lz
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.xz
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.tar.zst
nixpkgs-794158fcd54b862f3775bc8b54495a842a250b7b.zip
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/git')
-rw-r--r--pkgs/development/ocaml-modules/git/default.nix16
1 files changed, 4 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix
index 777184ed2e9..944195fd0a3 100644
--- a/pkgs/development/ocaml-modules/git/default.nix
+++ b/pkgs/development/ocaml-modules/git/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, dune
+{ stdenv, fetchFromGitHub, buildDunePackage
 , astring, decompress, fmt, hex, logs, mstruct, ocaml_lwt, ocamlgraph, uri
 , alcotest, mtime, nocrypto
 }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "git";
 	version = "1.11.5";
-	name = "ocaml${ocaml.version}-git-${version}";
 
 	src = fetchFromGitHub {
 		owner = "mirage";
@@ -14,22 +14,14 @@ stdenv.mkDerivation rec {
 		sha256 = "0r1bxpxjjnl9hh8xbabsxl7svzvd19hfy73a2y1m4kljmw64dpfh";
 	};
 
-	buildInputs = [ ocaml findlib dune alcotest mtime nocrypto ];
-
+	buildInputs = [ alcotest mtime nocrypto ];
 	propagatedBuildInputs = [ astring decompress fmt hex logs mstruct ocaml_lwt ocamlgraph uri ];
-
-	buildPhase = "dune build -p git";
-
-	inherit (dune) installPhase;
-
 	doCheck = true;
-	checkPhase = "dune runtest -p git";
 
 	meta = {
 		description = "Git format and protocol in pure OCaml";
 		license = stdenv.lib.licenses.isc;
 		maintainers = [ stdenv.lib.maintainers.vbgl ];
 		inherit (src.meta) homepage;
-		inherit (ocaml.meta) platforms;
 	};
 }