Skip to content

Commit

Permalink
ocamlPackages.digestif: init at 0.5
Browse files Browse the repository at this point in the history
Digestif provides some hash functions in OCaml.

Homepage: https://github.com/mirage/digestif
  • Loading branch information
vbgl committed Dec 15, 2017
1 parent 8a5d33e commit d39886d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pkgs/development/ocaml-modules/digestif/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ 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;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ let

decompress = callPackage ../development/ocaml-modules/decompress { };

digestif = callPackage ../development/ocaml-modules/digestif { };

dolmen = callPackage ../development/ocaml-modules/dolmen { };

dolog = callPackage ../development/ocaml-modules/dolog { };
Expand Down

0 comments on commit d39886d

Please sign in to comment.