2021-06-10 15:23:06 +01:00
|
|
|
{ lib, stdenv, fetchFromGitLab, ocaml, findlib, bzip2, autoreconfHook }:
|
|
|
|
|
|
|
|
if !lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
then throw "bz2 is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-bz2";
|
|
|
|
version = "0.7.0";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "irill";
|
|
|
|
repo = "camlbz2";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-jBFEkLN2fbC3LxTu7C0iuhvNg64duuckBHWZoBxrV/U=";
|
|
|
|
};
|
|
|
|
|
|
|
|
autoreconfFlags = "-I .";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
ocaml
|
|
|
|
findlib
|
2021-06-13 01:13:15 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-06-10 15:23:06 +01:00
|
|
|
bzip2
|
|
|
|
];
|
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-06-10 15:23:06 +01:00
|
|
|
preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OCaml bindings for the libbz2 (AKA, bzip2) (de)compression library";
|
|
|
|
downloadPage = "https://gitlab.com/irill/camlbz2";
|
|
|
|
license = licenses.lgpl21;
|
2021-11-03 00:38:27 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-06-10 15:23:06 +01:00
|
|
|
};
|
|
|
|
}
|