2018-11-30 03:24:54 +01:00
|
|
|
{ stdenv, fetchzip, which, ocaml, findlib, camlp4
|
2018-08-14 14:53:30 +02:00
|
|
|
, camlzip, camomile, extlib
|
|
|
|
}:
|
2016-10-05 09:32:30 +02:00
|
|
|
|
2017-06-30 18:55:04 +02:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4"
|
|
|
|
then throw "javalib not supported for ocaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2014-07-06 17:41:40 +02:00
|
|
|
let
|
|
|
|
pname = "javalib";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2017-06-30 18:55:04 +02:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2018-11-30 03:24:54 +01:00
|
|
|
version = "3.0";
|
2014-07-06 17:41:40 +02:00
|
|
|
|
2018-11-30 03:24:54 +01:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/javalib-team/javalib/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "02zgn1z1wj3rbg9xqmbagys91bnsy27iwrngkivzhlykyaw9vf6n";
|
2014-07-06 17:41:40 +02:00
|
|
|
};
|
|
|
|
|
2014-09-23 00:24:28 +02:00
|
|
|
buildInputs = [ which ocaml findlib camlp4 ];
|
2014-07-06 17:41:40 +02:00
|
|
|
|
|
|
|
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2015-01-08 10:26:49 +01:00
|
|
|
preConfigure = "patchShebangs ./configure.sh";
|
|
|
|
|
2014-07-06 17:41:40 +02:00
|
|
|
configureScript = "./configure.sh";
|
|
|
|
dontAddPrefix = "true";
|
|
|
|
|
2018-08-14 14:53:30 +02:00
|
|
|
propagatedBuildInputs = [ camlzip camomile extlib ];
|
2014-07-06 17:41:40 +02:00
|
|
|
|
2014-09-21 12:02:55 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-07-06 17:41:40 +02:00
|
|
|
description = "A library that parses Java .class files into OCaml data structures";
|
2018-11-30 03:24:54 +01:00
|
|
|
homepage = https://javalib-team.github.io/javalib/;
|
2014-09-21 12:02:55 +02:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2015-12-24 18:49:07 +01:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-07-06 17:41:40 +02:00
|
|
|
};
|
|
|
|
}
|