2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitLab,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
|
|
|
argcomplete,
|
|
|
|
requests,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
looseversion,
|
|
|
|
gnupg,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sdkmanager";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.6.8";
|
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "fdroid";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-Ev90WS/T+Rb8h/21XHQdy/GePhGiYWwyfP88OUyBojQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonRelaxDeps = [ "urllib3" ];
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
argcomplete
|
|
|
|
requests
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ requests.optional-dependencies.socks ++ lib.optionals (pythonAtLeast "3.12") [ looseversion ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/sdkmanager \
|
|
|
|
--suffix PATH : ${lib.makeBinPath [ gnupg ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "sdkmanager" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.com/fdroid/sdkmanager";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Drop-in replacement for sdkmanager from the Android SDK written in Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sdkmanager";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ linsui ];
|
|
|
|
};
|
|
|
|
}
|