nixpkgs/pkgs/development/java-modules/jna/default.nix

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

38 lines
910 B
Nix
Raw Normal View History

2022-11-29 21:45:00 +01:00
{ stdenv, lib, fetchFromGitHub, ant, jdk8 }:
stdenv.mkDerivation rec {
pname = "jna";
2023-02-16 02:44:16 +01:00
version = "5.13.0";
2022-11-29 21:45:00 +01:00
src = fetchFromGitHub {
owner = "java-native-access";
repo = pname;
rev = version;
2023-02-16 02:44:16 +01:00
hash = "sha256-EIOVmzQcnbL1NmxAaUVCMDvs9wpKqhP5iHAPoBVs3ho=";
2022-11-29 21:45:00 +01:00
};
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 ];
2023-09-14 00:58:43 +02:00
platforms = platforms.linux ++ platforms.darwin;
2022-11-29 21:45:00 +01:00
changelog = "https://github.com/java-native-access/jna/blob/${version}/CHANGES.md";
};
}