1 { stdenv, lib, fetchFromGitHub, ant, jdk, stripJavaArchivesHook }:
3 stdenv.mkDerivation (finalAttrs: {
7 src = fetchFromGitHub {
8 owner = "java-native-access";
10 rev = finalAttrs.version;
11 hash = "sha256-a5l9khKLWfvTHv53utfbw344/UNQOnIU93+wZNQ0ji4=";
14 nativeBuildInputs = [ ant jdk stripJavaArchivesHook ];
18 rm -r dist # remove prebuilt files
25 install -Dm444 -t $out/share/java dist/jna{,-platform}.jar
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;