summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/csv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/csv/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/csv/default.nix16
1 files changed, 5 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/csv/default.nix b/pkgs/development/ocaml-modules/csv/default.nix
index 6c6f8a68f81..8b67200f32f 100644
--- a/pkgs/development/ocaml-modules/csv/default.nix
+++ b/pkgs/development/ocaml-modules/csv/default.nix
@@ -1,26 +1,20 @@
-{ stdenv, fetchurl, ocaml, findlib, dune }:
+{ stdenv, fetchurl, buildDunePackage }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "csv";
 	version = "2.1";
-	name = "ocaml${ocaml.version}-csv-${version}";
+
 	src = fetchurl {
-		url = "https://github.com/Chris00/ocaml-csv/releases/download/2.1/csv-2.1.tbz";
+		url = "https://github.com/Chris00/ocaml-${pname}/releases/download/${version}/csv-${version}.tbz";
 		sha256 = "0cgfb6cwhwy7ypc1i3jyfz6sdnykp75aqi6kk0g1a2d81yjwzbcg";
 	};
 
 	unpackCmd = "tar -xjf $src";
 
-	buildInputs = [ ocaml findlib dune ];
-
-	buildPhase = "dune build -p csv";
-
-	inherit (dune) installPhase;
-
 	meta = {
 		description = "A pure OCaml library to read and write CSV files";
 		license = stdenv.lib.licenses.lgpl21;
 		maintainers = [ stdenv.lib.maintainers.vbgl ];
 		homepage = https://github.com/Chris00/ocaml-csv;
-		inherit (ocaml.meta) platforms;
 	};
 }