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";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.5.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
|
|
|
"${pname} is not available for OCaml ${ocaml.version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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;
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-G1W8/G0TEcldnFnH/NAb9a6ZSGGP2fWTM47lI8bBHnw=";
|
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 ];
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|