summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/uri
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/uri
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/uri')
-rw-r--r--pkgs/development/ocaml-modules/uri/default.nix17
1 files changed, 5 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/uri/default.nix b/pkgs/development/ocaml-modules/uri/default.nix
index 4959ef7b34a..a8b664b0720 100644
--- a/pkgs/development/ocaml-modules/uri/default.nix
+++ b/pkgs/development/ocaml-modules/uri/default.nix
@@ -1,33 +1,26 @@
-{ stdenv, fetchurl, ocaml, findlib, dune, ppx_sexp_conv, ounit
+{ stdenv, fetchurl, buildDunePackage, ppx_sexp_conv, ounit
 , re, sexplib, stringext
 }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "uri";
   version = "1.9.6";
-  name = "ocaml${ocaml.version}-uri-${version}";
 
   src = fetchurl {
-    url = "https://github.com/mirage/ocaml-uri/releases/download/v${version}/uri-${version}.tbz";
+    url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
     sha256 = "1m845rwd70wi4iijkrigyz939m1x84ba70hvv0d9sgk6971w4kz0";
   };
 
   unpackCmd = "tar -xjf $curSrc";
 
-  buildInputs = [ ocaml findlib dune ounit ];
+  buildInputs = [ ounit ];
   propagatedBuildInputs = [ ppx_sexp_conv re sexplib stringext ];
-
-  buildPhase = "jbuilder build";
-
   doCheck = true;
-  checkPhase = "jbuilder runtest";
-
-  inherit (dune) installPhase;
 
   meta = {
     homepage = "https://github.com/mirage/ocaml-uri";
     description = "RFC3986 URI parsing library for OCaml";
     license = stdenv.lib.licenses.isc;
     maintainers = [ stdenv.lib.maintainers.vbgl ];
-    inherit (ocaml.meta) platforms;
   };
 }