2021-10-17 09:34:42 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib, javalib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "sawja";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.5.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.07"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "${pname} is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
pname = "ocaml${ocaml.version}-${pname}";
|
|
|
|
|
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "javalib-team";
|
|
|
|
repo = pname;
|
2021-10-17 09:34:42 +00:00
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-1aKkRZDuLJLmDhUC1FXnn4QrgXaTyAbnXfTOAdnKgs8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ which ocaml findlib ];
|
2021-10-17 09:34:42 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
preConfigure = "patchShebangs ./configure.sh";
|
|
|
|
|
|
|
|
configureScript = "./configure.sh";
|
|
|
|
dontAddPrefix = "true";
|
2021-09-18 10:52:07 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ javalib ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A library written in OCaml, relying on Javalib to provide a high level representation of Java bytecode programs";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "http://sawja.inria.fr/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
};
|
|
|
|
}
|