2022-09-22 12:36:57 +00:00
|
|
|
{ lib, buildDunePackage, fetchurl, ocaml, cmdliner, ptime }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
|
|
|
|
pname = "crunch";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "3.3.1";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-08-21 13:32:41 +00:00
|
|
|
url = "https://github.com/mirage/ocaml-crunch/releases/download/v${version}/crunch-${version}.tbz";
|
|
|
|
sha256 = "sha256-LFug1BELy7dzHLpOr7bESnSHw/iMGtR0AScbaf+o7Wo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
buildInputs = [ cmdliner ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ ptime ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "lib" "bin" "out" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-03-09 03:18:52 +00:00
|
|
|
dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/mirage/ocaml-crunch";
|
|
|
|
description = "Convert a filesystem into a static OCaml module";
|
|
|
|
license = lib.licenses.isc;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|