depot/third_party/nixpkgs/pkgs/development/java-modules/jna/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

37 lines
910 B
Nix

{ stdenv, lib, fetchFromGitHub, ant, jdk8 }:
stdenv.mkDerivation rec {
pname = "jna";
version = "5.14.0";
src = fetchFromGitHub {
owner = "java-native-access";
repo = pname;
rev = version;
hash = "sha256-a5l9khKLWfvTHv53utfbw344/UNQOnIU93+wZNQ0ji4=";
};
nativeBuildInputs = [ ant jdk8 ];
buildPhase = ''
runHook preBuild
rm -r dist # remove prebuilt files
ant dist
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm444 -t $out/share/java dist/jna{,-platform}.jar
runHook postInstall
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Java Native Access";
license = with licenses; [ lgpl21 asl20 ];
maintainers = with maintainers; [ nagy ];
platforms = platforms.linux ++ platforms.darwin;
changelog = "https://github.com/java-native-access/jna/blob/${version}/CHANGES.md";
};
}