biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / java-modules / jna / default.nix
blobac9590da85dec27d8e93db18c1b70cd0022867f1
1 { stdenv, lib, fetchFromGitHub, ant, jdk, stripJavaArchivesHook }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "jna";
5   version = "5.14.0";
7   src = fetchFromGitHub {
8     owner = "java-native-access";
9     repo = "jna";
10     rev = finalAttrs.version;
11     hash = "sha256-a5l9khKLWfvTHv53utfbw344/UNQOnIU93+wZNQ0ji4=";
12   };
14   nativeBuildInputs = [ ant jdk stripJavaArchivesHook ];
16   buildPhase = ''
17     runHook preBuild
18     rm -r dist # remove prebuilt files
19     ant dist
20     runHook postBuild
21   '';
23   installPhase = ''
24     runHook preInstall
25     install -Dm444 -t $out/share/java dist/jna{,-platform}.jar
26     runHook postInstall
27   '';
29   meta = with lib; {
30     changelog = "https://github.com/java-native-access/jna/blob/${finalAttrs.version}/CHANGES.md";
31     description = "Java Native Access";
32     homepage = "https://github.com/java-native-access/jna";
33     license = with licenses; [ lgpl21 asl20 ];
34     maintainers = with maintainers; [ nagy ];
35     platforms = platforms.linux ++ platforms.darwin;
36   };