depot/third_party/nixpkgs/pkgs/by-name/un/universal-android-debloater/package.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

63 lines
1.4 KiB
Nix

{ android-tools
, clang
, expat
, fetchFromGitHub
, fontconfig
, freetype
, lib
, libglvnd
, makeWrapper
, mold
, pkg-config
, rustPlatform
, xorg
}:
rustPlatform.buildRustPackage rec {
pname = "universal-android-debloater";
version = "0.6.2";
src = fetchFromGitHub {
owner = "Universal-Debloater-Alliance";
repo = pname;
rev = version;
hash = "sha256-yCtdCg2mEAz4b/ev32x+RbjCtHTu20mOKFgtckXk1Fo=";
};
cargoHash = "sha256-70dX5fqORdGG2q3YeXJHABCHy0dvtA/Cptk8aLGNgV4=";
buildInputs = [
expat
fontconfig
freetype
];
nativeBuildInputs = [
makeWrapper
mold
pkg-config
];
nativeCheckInputs = [
clang
];
preCheck = ''
export HOME="$(mktemp -d)"
'';
postInstall = ''
wrapProgram $out/bin/uad_gui \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ fontconfig freetype libglvnd xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr ]} \
--suffix PATH : ${lib.makeBinPath [ android-tools ]}
'';
meta = with lib; {
description = "A tool to debloat non-rooted Android devices";
changelog = "https://github.com/Universal-Debloater-Alliance/universal-android-debloater/blob/${src.rev}/CHANGELOG.md";
homepage = "https://github.com/Universal-Debloater-Alliance/universal-android-debloater";
license = licenses.gpl3Only;
mainProgram = "uad_gui";
maintainers = with maintainers; [ xfix ];
platforms = platforms.linux;
};
}