2018-08-14 13:53:30 +01:00
|
|
|
{ stdenv, fetchurl, which, ocaml, findlib, camlp4
|
|
|
|
, camlzip, camomile, extlib
|
|
|
|
}:
|
2016-10-05 08:32:30 +01:00
|
|
|
|
2017-06-30 17:55:04 +01:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4"
|
|
|
|
then throw "javalib not supported for ocaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2014-07-06 16:41:40 +01:00
|
|
|
let
|
|
|
|
pname = "javalib";
|
|
|
|
webpage = "http://sawja.inria.fr/";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2017-06-30 17:55:04 +01:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2018-08-14 13:53:30 +01:00
|
|
|
version = "2.3.5";
|
2014-07-06 16:41:40 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-14 13:53:30 +01:00
|
|
|
url = "https://gforge.inria.fr/frs/download.php/file/37655/javalib-2.3.5.tar.bz2";
|
|
|
|
sha256 = "1gks12ghcmv9lm8j4diw8bvjqxfl7xwk0sxbi227saxg9irpwwkd";
|
2014-07-06 16:41:40 +01:00
|
|
|
};
|
|
|
|
|
2014-09-22 23:24:28 +01:00
|
|
|
buildInputs = [ which ocaml findlib camlp4 ];
|
2014-07-06 16:41:40 +01:00
|
|
|
|
|
|
|
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2015-01-08 09:26:49 +00:00
|
|
|
preConfigure = "patchShebangs ./configure.sh";
|
|
|
|
|
2014-07-06 16:41:40 +01:00
|
|
|
configureScript = "./configure.sh";
|
|
|
|
dontAddPrefix = "true";
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
make ptrees;
|
|
|
|
make installptrees;
|
2016-10-05 08:32:30 +01:00
|
|
|
export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH;
|
2014-07-06 16:41:40 +01:00
|
|
|
'';
|
|
|
|
|
2018-08-14 13:53:30 +01:00
|
|
|
propagatedBuildInputs = [ camlzip camomile extlib ];
|
2014-07-06 16:41:40 +01:00
|
|
|
|
2014-09-21 11:02:55 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-07-06 16:41:40 +01:00
|
|
|
description = "A library that parses Java .class files into OCaml data structures";
|
|
|
|
homepage = "${webpage}";
|
2014-09-21 11:02:55 +01:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-07-06 16:41:40 +01:00
|
|
|
};
|
|
|
|
}
|