aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix
blob: dd8a0f571649b7ee00cabb3710f40ab2d2714fda (plain)
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
{ lib, ocaml, fetchurl, buildDunePackage
, bigarray-compat, eqaf, stdlib-shims
, alcotest, astring, bos, findlib, fpath
}:

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

  useDune2 = true;

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

  propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ];

  checkInputs = [ alcotest astring bos fpath ];
  doCheck = lib.versionAtLeast ocaml.version "4.05";

  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 ];
  };
}