about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/digestif
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-10-07 06:48:15 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-10-15 07:08:13 +0200
commit0feb4e8729e2117200ce30e63981e4de078a8e86 (patch)
tree2244f9f344ffc918d95b43d46968a68393334d4a /pkgs/development/ocaml-modules/digestif
parente191a69e8d97935f00e3ad5f63fe63c869955c69 (diff)
ocamlPackages.digestif: 0.5 → 0.8.0
Diffstat (limited to 'pkgs/development/ocaml-modules/digestif')
-rw-r--r--pkgs/development/ocaml-modules/digestif/default.nix29
1 files changed, 14 insertions, 15 deletions
diff --git a/pkgs/development/ocaml-modules/digestif/default.nix b/pkgs/development/ocaml-modules/digestif/default.nix
index d8089bb533f04..f0a98249d6da8 100644
--- a/pkgs/development/ocaml-modules/digestif/default.nix
+++ b/pkgs/development/ocaml-modules/digestif/default.nix
@@ -1,27 +1,26 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+{ lib, fetchurl, buildDunePackage
+, bigarray-compat, eqaf, stdlib-shims
+, alcotest
+}:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.3"
-then throw "digestif is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-digestif-${version}";
-  version = "0.5";
+buildDunePackage rec {
+  pname = "digestif";
+  version = "0.8.0";
 
   src = fetchurl {
-    url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz";
-    sha256 = "0fsyfi5ps17j3wjav5176gf6z3a5xcw9aqhcr1gml9n9ayfbkhrd";
+    url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-v${version}.tbz";
+    sha256 = "09g4zngqiw97cljv8ds4m063wcxz3y7c7vzaprsbpjzi0ja5jdcy";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild topkg ];
+  buildInputs = lib.optional doCheck alcotest;
+  propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ];
 
-  inherit (topkg) buildPhase installPhase;
+  doCheck = true;
 
   meta = {
     description = "Simple hash algorithms in OCaml";
     homepage = "https://github.com/mirage/digestif";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ stdenv.lib.maintainers.vbgl ];
-    inherit (ocaml.meta) platforms;
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.vbgl ];
   };
 }