diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/java')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix | 9 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/java/jffi/default.nix | 47 |
2 files changed, 52 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix index 19bc3524c590..4b18cd7cfadc 100644 --- a/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix +++ b/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix @@ -1,13 +1,14 @@ -{ fetchgit, lib, stdenv, ant, jdk }: +{ fetchFromGitHub, lib, stdenv, ant, jdk }: stdenv.mkDerivation { pname = "hydra-ant-logger"; version = "2010.2"; - src = fetchgit { - url = "https://github.com/NixOS/hydra-ant-logger.git"; + src = fetchFromGitHub { + owner = "NixOS"; + repo = "hydra-ant-logger"; rev = "dae3224f4ed42418d3492bdf5bee4f825819006f"; - sha256 = "01s7m6007rn9107rw5wcgna7i20x6p6kfzl4f79jrvpkjy6kz176"; + sha256 = "sha256-5oQ/jZfz7izTcYR+N801HYh4lH2MF54PCMnmA4CpRwc="; }; buildInputs = [ ant jdk ]; diff --git a/nixpkgs/pkgs/development/libraries/java/jffi/default.nix b/nixpkgs/pkgs/development/libraries/java/jffi/default.nix new file mode 100644 index 000000000000..c15a6ddb819c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/jffi/default.nix @@ -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 ]; + }; +} |