jffi: init at 1.3.9

This commit is contained in:
Pascal Bach 2022-01-15 00:16:10 +01:00
parent 481cc5f7db
commit a2c06170a3
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,47 @@
{ lib, stdenv, fetchFromGitHub, jdk, jre, ant, libffi, texinfo, pkg-config }:
stdenv.mkDerivation rec {
pname = "jffi";
version = "1.3.9";
src = fetchFromGitHub {
owner = "jnr";
repo = "jffi";
rev = "jffi-${version}";
sha256 = "sha256-VjZYhMbad+AesANG06umRzqMWj+Ebzu59TYK7Tm/bFo=";
};
nativeBuildInputs = [ jdk ant texinfo pkg-config ];
buildInputs = [ libffi ] ;
buildPhase = ''
# The pkg-config script in the build.xml doesn't work propery
# set the lib path manually to work around this.
export LIBFFI_LIBS="${libffi}/lib/libffi.so"
ant -Duse.system.libffi=1 jar
ant -Duse.system.libffi=1 archive-platform-jar
'';
installPhase = ''
mkdir -p $out/share/java
cp -r dist/* $out/share/java
'';
doCheck = true;
checkPhase = ''
# The pkg-config script in the build.xml doesn't work propery
# set the lib path manually to work around this.
export LIBFFI_LIBS="${libffi}/lib/libffi.so"
ant -Duse.system.libffi=1 test
'';
meta = with lib; {
description = "Java Foreign Function Interface ";
homepage = "https://github.com/jnr/jffi";
platforms = platforms.unix;
license = licenses.asl20;
maintainers = with maintainers; [ bachp ];
};
}

View file

@ -20950,6 +20950,8 @@ with pkgs;
jdom = callPackage ../development/libraries/java/jdom { };
jffi = callPackage ../development/libraries/java/jffi { };
jflex = callPackage ../development/libraries/java/jflex { };
lombok = callPackage ../development/libraries/java/lombok { };