nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

2021-10-13 04:42:47 +00:00
{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib, javalib }:
let
pname = "sawja";
2022-03-24 17:41:07 +00:00
version = "1.5.11";
in
if lib.versionOlder ocaml.version "4.07"
then throw "${pname} is not available for OCaml ${ocaml.version}"
else
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
2021-10-13 04:42:47 +00:00
pname = "ocaml${ocaml.version}-${pname}";
inherit version;
src = fetchFromGitHub {
owner = "javalib-team";
repo = pname;
2021-10-13 04:42:47 +00:00
rev = version;
2022-03-24 17:41:07 +00:00
sha256 = "sha256-1aKkRZDuLJLmDhUC1FXnn4QrgXaTyAbnXfTOAdnKgs8=";
};
nativeBuildInputs = [ which ocaml findlib ];
2021-10-13 04:42:47 +00:00
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 = [ javalib ];
meta = with lib; {
description = "A 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/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.vbgl ];
inherit (ocaml.meta) platforms;
};
}