11 if lib.versionOlder ocaml.version "4.04"
12 then throw "javalib is not available for OCaml ${ocaml.version}"
15 stdenv.mkDerivation rec {
16 pname = "ocaml${ocaml.version}-javalib";
19 src = fetchFromGitHub {
20 owner = "javalib-team";
23 sha256 = "sha256-du1h+S+A7CetMXofsYxdGeSsobCgspDB9oUE9WNUbbo=";
26 nativeBuildInputs = [ which ocaml findlib ];
30 patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
32 createFindlibDestdir = true;
34 preConfigure = "patchShebangs ./configure.sh";
36 configureScript = "./configure.sh";
37 dontAddPrefix = "true";
38 dontAddStaticConfigureFlags = true;
39 configurePlatforms = [ ];
41 propagatedBuildInputs = [ camlzip extlib ];
44 description = "A library that parses Java .class files into OCaml data structures";
45 homepage = "https://javalib-team.github.io/javalib/";
46 license = licenses.lgpl3;
47 maintainers = [ maintainers.vbgl ];
48 inherit (ocaml.meta) platforms;