2021-10-30 22:50:11 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, which
|
|
|
|
, ocaml
|
|
|
|
, findlib
|
|
|
|
, camlzip
|
|
|
|
, extlib
|
2018-08-14 14:53:30 +02:00
|
|
|
}:
|
2016-10-05 09:32:30 +02:00
|
|
|
|
2023-01-27 07:23:45 +01:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
|
|
|
"javalib is not available for OCaml ${ocaml.version}"
|
2017-06-30 18:55:04 +02:00
|
|
|
|
2014-07-06 17:41:40 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2021-10-30 22:50:11 +02:00
|
|
|
pname = "ocaml${ocaml.version}-javalib";
|
2023-01-27 07:23:45 +01:00
|
|
|
version = "3.2.2";
|
2014-07-06 17:41:40 +02:00
|
|
|
|
2021-10-30 22:50:11 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "javalib-team";
|
|
|
|
repo = "javalib";
|
2023-01-27 07:23:45 +01:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-XaI7GTU/O5UEWuYX4yqaIRmEoH7FuvCg/+gtKbE/P1s=";
|
2014-07-06 17:41:40 +02:00
|
|
|
};
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
nativeBuildInputs = [ which ocaml findlib ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2014-07-06 17:41:40 +02:00
|
|
|
|
|
|
|
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
configureScript = "./configure.sh";
|
|
|
|
dontAddPrefix = "true";
|
2021-08-14 14:00:00 +02:00
|
|
|
dontAddStaticConfigureFlags = true;
|
2021-10-30 22:50:11 +02:00
|
|
|
configurePlatforms = [ ];
|
2014-07-06 17:41:40 +02:00
|
|
|
|
2019-08-20 06:45:46 +02:00
|
|
|
propagatedBuildInputs = [ camlzip extlib ];
|
2014-07-06 17:41:40 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-07-06 17:41:40 +02:00
|
|
|
description = "A library that parses Java .class files into OCaml data structures";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://javalib-team.github.io/javalib/";
|
2014-09-21 12:02:55 +02:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2019-08-20 06:45:46 +02:00
|
|
|
inherit (ocaml.meta) platforms;
|
2014-07-06 17:41:40 +02:00
|
|
|
};
|
|
|
|
}
|