2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitLab
|
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonAtLeast
|
2023-07-15 17:15:38 +00:00
|
|
|
, argcomplete
|
|
|
|
, requests
|
2024-04-21 15:54:59 +00:00
|
|
|
, looseversion
|
2023-07-15 17:15:38 +00:00
|
|
|
, gnupg
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sdkmanager";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.6.6";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "fdroid";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Vuht2gH9ivNG7PgG+XKtkdKoszkkoI91reQKg6D50xs=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
argcomplete
|
|
|
|
requests
|
2024-04-21 15:54:59 +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";
|
|
|
|
description = "A 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 ];
|
|
|
|
};
|
|
|
|
}
|