2021-10-13 04:42:47 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib, javalib }:
|
2014-09-21 10:02:55 +00:00
|
|
|
|
2014-07-06 15:41:40 +00:00
|
|
|
let
|
|
|
|
pname = "sawja";
|
2023-01-27 06:23:50 +00:00
|
|
|
version = "1.5.12";
|
2014-07-06 15:41:40 +00:00
|
|
|
in
|
2020-02-21 08:18:51 +00:00
|
|
|
|
2023-01-27 06:23:50 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
|
|
|
"${pname} is not available for OCaml ${ocaml.version}"
|
2020-02-21 08:18:51 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2014-07-06 15:41:40 +00:00
|
|
|
|
2021-10-13 04:42:47 +00:00
|
|
|
pname = "ocaml${ocaml.version}-${pname}";
|
|
|
|
|
|
|
|
inherit version;
|
2014-07-06 15:41:40 +00:00
|
|
|
|
2020-02-21 08:18:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "javalib-team";
|
|
|
|
repo = pname;
|
2021-10-13 04:42:47 +00:00
|
|
|
rev = version;
|
2023-01-27 06:23:50 +00:00
|
|
|
hash = "sha256-G1W8/G0TEcldnFnH/NAb9a6ZSGGP2fWTM47lI8bBHnw=";
|
2014-07-06 15:41:40 +00:00
|
|
|
};
|
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ which ocaml findlib ];
|
2021-10-13 04:42:47 +00:00
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
strictDeps = true;
|
2014-07-06 15:41:40 +00:00
|
|
|
|
|
|
|
patches = [ ./configure.sh.patch ./Makefile.config.example.patch ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
configureScript = "./configure.sh";
|
|
|
|
dontAddPrefix = "true";
|
2021-08-14 12:00:00 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [];
|
2014-07-06 15:41:40 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ javalib ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-07-06 15:41:40 +00:00
|
|
|
description = "Library written in OCaml, relying on Javalib to provide a high level representation of Java bytecode programs";
|
2022-03-24 17:41:07 +00:00
|
|
|
homepage = "http://sawja.inria.fr/";
|
2014-09-21 10:02:55 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2022-05-10 17:36:58 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2014-07-06 15:41:40 +00:00
|
|
|
};
|
|
|
|
}
|