summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/digestif/default.nix
blob: 2e2e3a7b23bbe1c6b07d704e23effb98ae1d5de3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, ocaml, fetchurl, buildDunePackage
, pkg-config, which
, eqaf
, alcotest, astring, bos, findlib, fpath
}:

buildDunePackage rec {
  pname = "digestif";
  version = "1.1.2";

  minimalOCamlVersion = "4.08";

  src = fetchurl {
    url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz";
    sha256 = "sha256-edNM5ROxFIV+OAqr328UcyGPGwXdflHQOJB3ntAbRmY=";
  };

  nativeBuildInputs = [ findlib which ];
  buildInputs = [ ocaml ];

  propagatedBuildInputs = [ eqaf ];

  checkInputs = [ alcotest astring bos fpath ];
  doCheck = true;

  postCheck = ''
    ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ test/test_runes.ml
  '';

  meta = {
    description = "Simple hash algorithms in OCaml";
    homepage = "https://github.com/mirage/digestif";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.vbgl ];
  };
}