mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1012 B
Nix
38 lines
1012 B
Nix
{ stdenv, lib, fetchFromGitHub, ant, jdk, stripJavaArchivesHook }:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "jna";
|
|
version = "5.15.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "java-native-access";
|
|
repo = "jna";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-PadOJtoH+guPBQ/j6nIBp7BokNz23OQhaYpcFl/wbpQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [ ant jdk stripJavaArchivesHook ];
|
|
|
|
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; {
|
|
changelog = "https://github.com/java-native-access/jna/blob/${finalAttrs.version}/CHANGES.md";
|
|
description = "Java Native Access";
|
|
homepage = "https://github.com/java-native-access/jna";
|
|
license = with licenses; [ lgpl21 asl20 ];
|
|
maintainers = with maintainers; [ nagy ];
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
})
|