2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitLab,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
|
|
|
argcomplete,
|
|
|
|
requests,
|
|
|
|
looseversion,
|
|
|
|
gnupg,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sdkmanager";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.6.7";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "fdroid";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-8Iq3sVp9/dZi4zNZIgNm38ntoA2koS/Ism+pIVATr4Q=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
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";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|