summary refs log tree commit diff
path: root/pkgs/development/tools/ocaml/crunch/default.nix
blob: e48707dcb9af668e7e896395411491b7a1739887 (plain) (blame)
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
{ lib, buildDunePackage, fetchurl, ocaml, cmdliner, opaline, ptime }:

buildDunePackage rec {

  pname = "crunch";
  version = "3.1.0";

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

  propagatedBuildInputs = [ cmdliner ptime ];

  outputs = [ "lib" "bin" "out" ];

  installPhase = ''
    ${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib/
  '';

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

}