Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 51 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 ocaml, 6 findlib, 7 bzip2, 8 autoreconfHook, 9}: 10 11if lib.versionOlder ocaml.version "4.02" || lib.versionAtLeast ocaml.version "5.0" then 12 throw "bz2 is not available for OCaml ${ocaml.version}" 13else 14 15 stdenv.mkDerivation rec { 16 pname = "ocaml${ocaml.version}-bz2"; 17 version = "0.7.0"; 18 19 src = fetchFromGitLab { 20 owner = "irill"; 21 repo = "camlbz2"; 22 rev = version; 23 sha256 = "sha256-jBFEkLN2fbC3LxTu7C0iuhvNg64duuckBHWZoBxrV/U="; 24 }; 25 26 autoreconfFlags = [ 27 "-I" 28 "." 29 ]; 30 31 nativeBuildInputs = [ 32 autoreconfHook 33 ocaml 34 findlib 35 ]; 36 37 propagatedBuildInputs = [ 38 bzip2 39 ]; 40 41 strictDeps = true; 42 43 preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs"; 44 45 meta = with lib; { 46 description = "OCaml bindings for the libbz2 (AKA, bzip2) (de)compression library"; 47 downloadPage = "https://gitlab.com/irill/camlbz2"; 48 license = licenses.lgpl21; 49 maintainers = [ ]; 50 }; 51 }