about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/httpaf
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/httpaf
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
downloadnixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar
nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.gz
nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.bz2
nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.lz
nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.xz
nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.tar.zst
nixlib-794158fcd54b862f3775bc8b54495a842a250b7b.zip
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/httpaf')
-rw-r--r--pkgs/development/ocaml-modules/httpaf/default.nix19
1 files changed, 5 insertions, 14 deletions
diff --git a/pkgs/development/ocaml-modules/httpaf/default.nix b/pkgs/development/ocaml-modules/httpaf/default.nix
index e8638e4cf184..bec4f947ce30 100644
--- a/pkgs/development/ocaml-modules/httpaf/default.nix
+++ b/pkgs/development/ocaml-modules/httpaf/default.nix
@@ -1,33 +1,24 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, dune
-, angstrom, faraday, alcotest
-}:
+{ stdenv, fetchFromGitHub, buildDunePackage, angstrom, faraday, alcotest }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "httpaf";
   version = "0.4.1";
-  name = "ocaml${ocaml.version}-httpaf-${version}";
 
   src = fetchFromGitHub {
     owner = "inhabitedtype";
-    repo = "httpaf";
+    repo = pname;
     rev = version;
     sha256 = "0i2r004ihj00hd97475y8nhjqjln58xx087zcjl0dfp0n7q80517";
   };
 
-  buildInputs = [ ocaml findlib dune alcotest ];
+  buildInputs = [ alcotest ];
   propagatedBuildInputs = [ angstrom faraday ];
-
-  buildPhase = "dune build -p httpaf";
-
   doCheck = true;
-  checkPhase = "dune runtest -p httpaf";
-
-  inherit (dune) installPhase;
 
   meta = {
     description = "A high-performance, memory-efficient, and scalable web server for OCaml";
     license = stdenv.lib.licenses.bsd3;
     maintainers = [ stdenv.lib.maintainers.vbgl ];
     inherit (src.meta) homepage;
-    inherit (ocaml.meta) platforms;
   };
 }