11 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
12 "javalib is not available for OCaml ${ocaml.version}"
14 stdenv.mkDerivation rec {
15 pname = "ocaml${ocaml.version}-javalib";
18 src = fetchFromGitHub {
19 owner = "javalib-team";
22 hash = "sha256-XaI7GTU/O5UEWuYX4yqaIRmEoH7FuvCg/+gtKbE/P1s=";
25 nativeBuildInputs = [ which ocaml findlib ];
29 patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
31 createFindlibDestdir = true;
33 preConfigure = "patchShebangs ./configure.sh";
35 configureScript = "./configure.sh";
36 dontAddPrefix = "true";
37 dontAddStaticConfigureFlags = true;
38 configurePlatforms = [ ];
40 propagatedBuildInputs = [ camlzip extlib ];
43 description = "A library that parses Java .class files into OCaml data structures";
44 homepage = "https://javalib-team.github.io/javalib/";
45 license = licenses.lgpl3;
46 maintainers = [ maintainers.vbgl ];
47 inherit (ocaml.meta) platforms;