about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/zipc/default.nix
blob: a31d2644e668b5d271f0ff109ea291ad421fec09 (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
29
30
31
32
33
{ lib, stdenv, fetchurl
, ocaml, findlib, ocamlbuild, topkg, cmdliner
}:

lib.throwIfNot (lib.versionAtLeast ocaml.version "4.14")
  "zipc is not available for OCaml ${ocaml.version}"

stdenv.mkDerivation rec {
  pname = "ocaml${ocaml.version}-zipc";
  version = "0.2.0";

  src = fetchurl {
    url = "https://erratique.ch/software/zipc/releases/zipc-${version}.tbz";
    hash = "sha256-YQqkCURwrJgFH0+zgfket25zJQ4w+Tcc1mTSrDuWRt0=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    ocaml findlib ocamlbuild
  ];

  buildInputs = [ cmdliner topkg ];

  inherit (topkg) buildPhase installPhase;

  meta = {
    description = "ZIP archive and deflate codec for OCaml";
    homepage = "https://erratique.ch/software/zipc";
    license = lib.licenses.isc;
    maintainers = [ lib.maintainers.vbgl ];
  };
}