3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/javalib/default.nix

39 lines
1 KiB
Nix
Raw Normal View History

2019-08-20 05:45:46 +01:00
{ stdenv, fetchzip, which, ocaml, findlib
, camlzip, extlib
}:
2016-10-05 08:32:30 +01:00
2019-08-20 05:45:46 +01:00
if !stdenv.lib.versionAtLeast ocaml.version "4.04"
then throw "javalib is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
2019-08-20 05:45:46 +01:00
name = "ocaml${ocaml.version}-javalib-${version}";
version = "3.1.1";
src = fetchzip {
url = "https://github.com/javalib-team/javalib/archive/v${version}.tar.gz";
2019-08-20 05:45:46 +01:00
sha256 = "1myrf7kw7pi04pmp0bi4747nj4h4vfxlla05sz2hp4w8k76iscld";
};
2019-08-20 05:45:46 +01:00
buildInputs = [ which ocaml findlib ];
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
createFindlibDestdir = true;
preConfigure = "patchShebangs ./configure.sh";
configureScript = "./configure.sh";
dontAddPrefix = "true";
2019-08-20 05:45:46 +01:00
propagatedBuildInputs = [ camlzip extlib ];
meta = with stdenv.lib; {
description = "A library that parses Java .class files into OCaml data structures";
homepage = https://javalib-team.github.io/javalib/;
license = licenses.lgpl3;
maintainers = [ maintainers.vbgl ];
2019-08-20 05:45:46 +01:00
inherit (ocaml.meta) platforms;
};
}