mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 15:41:40 +00:00
d39886db5a
Digestif provides some hash functions in OCaml. Homepage: https://github.com/mirage/digestif
30 lines
858 B
Nix
30 lines
858 B
Nix
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
|
|
|
|
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";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz";
|
|
sha256 = "0fsyfi5ps17j3wjav5176gf6z3a5xcw9aqhcr1gml9n9ayfbkhrd";
|
|
};
|
|
|
|
unpackCmd = "tar -xjf $curSrc";
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild topkg ];
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
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;
|
|
};
|
|
}
|