2023-11-24 16:26:37 +01:00
|
|
|
{ android-tools
|
|
|
|
, clang
|
|
|
|
, expat
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, lib
|
|
|
|
, libglvnd
|
2024-04-28 15:22:17 +02:00
|
|
|
, libxkbcommon
|
|
|
|
, wayland
|
2023-11-24 16:26:37 +01:00
|
|
|
, makeWrapper
|
|
|
|
, mold
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "universal-android-debloater";
|
2024-03-25 19:42:00 +01:00
|
|
|
version = "1.0.3";
|
2023-11-24 16:26:37 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Universal-Debloater-Alliance";
|
2024-03-04 08:01:10 +01:00
|
|
|
repo = "universal-android-debloater-next-generation";
|
|
|
|
rev = "v${version}";
|
2024-03-25 19:42:00 +01:00
|
|
|
hash = "sha256-yiCl6inPFveMO4IA2NwwpEmbRSmrZBeZR+eiKzGj6a0=";
|
2023-11-24 16:26:37 +01:00
|
|
|
};
|
|
|
|
|
2024-03-25 19:42:00 +01:00
|
|
|
cargoHash = "sha256-HqyOslcr3pwDvpZ8CNbAy2W5jGhWGWoe/rutq0leNaY=";
|
2023-11-24 16:26:37 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
mold
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
clang
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2024-03-04 08:01:10 +01:00
|
|
|
wrapProgram $out/bin/uad-ng \
|
2024-04-28 15:22:17 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ fontconfig freetype libglvnd libxkbcommon wayland xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr ]} \
|
2023-11-24 16:26:37 +01:00
|
|
|
--suffix PATH : ${lib.makeBinPath [ android-tools ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to debloat non-rooted Android devices";
|
2024-03-04 08:01:10 +01:00
|
|
|
changelog = "https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
homepage = "https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation";
|
2023-11-24 16:26:37 +01:00
|
|
|
license = licenses.gpl3Only;
|
2024-03-04 08:01:10 +01:00
|
|
|
mainProgram = "uad-ng";
|
2024-04-28 15:22:17 +02:00
|
|
|
maintainers = with maintainers; [ lavafroth ];
|
2023-11-24 16:26:37 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|