mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 11:03:57 +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.
46 lines
1023 B
Nix
46 lines
1023 B
Nix
{ lib
|
|
, stdenvNoCC
|
|
, fetchurl
|
|
, jre
|
|
, makeWrapper
|
|
, unzip
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "dex2jar";
|
|
version = "2.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/pxb1988/dex2jar/releases/download/v${finalAttrs.version}/dex-tools-v${finalAttrs.version}.zip";
|
|
hash = "sha256-7nxF6zwdJHSmFF2NRH5lGnNqItlmS209O+WlqBfdojo=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
|
|
|
postPatch = ''
|
|
rm *.bat
|
|
chmod +x *.sh
|
|
'';
|
|
|
|
installPhase = ''
|
|
f=$out/share/dex2jar/
|
|
|
|
mkdir -p $f $out/bin
|
|
|
|
mv * $f
|
|
for i in $f/*.sh; do
|
|
n=$(basename ''${i%.sh})
|
|
makeWrapper $i $out/bin/$n --prefix PATH : ${lib.makeBinPath [ jre ] }
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/pxb1988/dex2jar";
|
|
description = "Tools to work with android .dex and java .class files";
|
|
maintainers = with maintainers; [ makefu ];
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = licenses.asl20;
|
|
platforms = platforms.unix;
|
|
};
|
|
})
|