1 { lib, stdenv, fetchFromGitHub, jdk, jre, ant, libffi, texinfo, pkg-config }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "jffi-${version}";
11 sha256 = "sha256-VjZYhMbad+AesANG06umRzqMWj+Ebzu59TYK7Tm/bFo=";
14 nativeBuildInputs = [ jdk ant texinfo pkg-config ];
15 buildInputs = [ libffi ] ;
18 # The pkg-config script in the build.xml doesn't work propery
19 # set the lib path manually to work around this.
20 export LIBFFI_LIBS="${libffi}/lib/libffi.so"
22 ant -Duse.system.libffi=1 jar
23 ant -Duse.system.libffi=1 archive-platform-jar
27 mkdir -p $out/share/java
28 cp -r dist/* $out/share/java
33 # The pkg-config script in the build.xml doesn't work propery
34 # set the lib path manually to work around this.
35 export LIBFFI_LIBS="${libffi}/lib/libffi.so"
37 ant -Duse.system.libffi=1 test
41 broken = stdenv.isDarwin;
42 description = "Java Foreign Function Interface ";
43 homepage = "https://github.com/jnr/jffi";
44 platforms = platforms.unix;
45 license = licenses.asl20;
46 maintainers = with maintainers; [ bachp ];