nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4, which
5, ocaml
6, findlib
7, camlzip
8, extlib
9}:
10
11lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
12 "javalib is not available for OCaml ${ocaml.version}"
13
14stdenv.mkDerivation rec {
15 pname = "ocaml${ocaml.version}-javalib";
16 version = "3.2.2";
17
18 src = fetchFromGitHub {
19 owner = "javalib-team";
20 repo = "javalib";
21 rev = version;
22 hash = "sha256-XaI7GTU/O5UEWuYX4yqaIRmEoH7FuvCg/+gtKbE/P1s=";
23 };
24
25 nativeBuildInputs = [ which ocaml findlib ];
26
27 strictDeps = true;
28
29 patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
30
31 createFindlibDestdir = true;
32
33 configureScript = "./configure.sh";
34 dontAddPrefix = "true";
35 dontAddStaticConfigureFlags = true;
36 configurePlatforms = [ ];
37
38 propagatedBuildInputs = [ camlzip extlib ];
39
40 meta = with lib; {
41 description = "Library that parses Java .class files into OCaml data structures";
42 homepage = "https://javalib-team.github.io/javalib/";
43 license = licenses.lgpl3;
44 maintainers = [ maintainers.vbgl ];
45 inherit (ocaml.meta) platforms;
46 };
47}