mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
a13cdfe520
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild. This makes some closures significantly smaller and makes cross compilation easier
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, which
|
|
, ocaml
|
|
, findlib
|
|
, camlzip
|
|
, extlib
|
|
}:
|
|
|
|
if !lib.versionAtLeast ocaml.version "4.04"
|
|
then throw "javalib is not available for OCaml ${ocaml.version}"
|
|
else
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ocaml${ocaml.version}-javalib";
|
|
version = "3.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "javalib-team";
|
|
repo = "javalib";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-du1h+S+A7CetMXofsYxdGeSsobCgspDB9oUE9WNUbbo=";
|
|
};
|
|
|
|
nativeBuildInputs = [ which ocaml findlib ];
|
|
|
|
strictDeps = true;
|
|
|
|
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
preConfigure = "patchShebangs ./configure.sh";
|
|
|
|
configureScript = "./configure.sh";
|
|
dontAddPrefix = "true";
|
|
dontAddStaticConfigureFlags = true;
|
|
configurePlatforms = [ ];
|
|
|
|
propagatedBuildInputs = [ camlzip extlib ];
|
|
|
|
meta = with 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 ];
|
|
inherit (ocaml.meta) platforms;
|
|
};
|
|
}
|