1{
2 lib,
3 buildDunePackage,
4 fetchurl,
5 ocaml,
6 cmdliner,
7 ptime,
8}:
9
10buildDunePackage rec {
11
12 pname = "crunch";
13 version = "4.0.0";
14
15 minimalOCamlVersion = "4.08";
16
17 src = fetchurl {
18 url = "https://github.com/mirage/ocaml-crunch/releases/download/v${version}/crunch-${version}.tbz";
19 sha256 = "sha256-k5uNESntbGNMsPnMxvbUSqFwPNBc5gkfLuKgFilEuJs=";
20 };
21
22 buildInputs = [ cmdliner ];
23
24 propagatedBuildInputs = [ ptime ];
25
26 outputs = [
27 "lib"
28 "bin"
29 "out"
30 ];
31
32 installPhase = ''
33 dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib/
34 '';
35
36 meta = {
37 homepage = "https://github.com/mirage/ocaml-crunch";
38 description = "Convert a filesystem into a static OCaml module";
39 mainProgram = "ocaml-crunch";
40 license = lib.licenses.isc;
41 maintainers = [ lib.maintainers.vbgl ];
42 };
43
44}