From 998f085ff972a256919cc4d6977f66493ac46b5b Mon Sep 17 00:00:00 2001 From: linsui Date: Fri, 2 Jun 2023 00:34:03 +0800 Subject: [PATCH] sdkmanager: init at 0.6.5 --- .../python-modules/sdkmanager/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/sdkmanager/default.nix diff --git a/pkgs/development/python-modules/sdkmanager/default.nix b/pkgs/development/python-modules/sdkmanager/default.nix new file mode 100644 index 000000000000..0a2092c3d24c --- /dev/null +++ b/pkgs/development/python-modules/sdkmanager/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitLab +, pythonOlder +, argcomplete +, requests +, gnupg +}: + +buildPythonPackage rec { + pname = "sdkmanager"; + version = "0.6.5"; + format = "setuptools"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitLab { + owner = "fdroid"; + repo = pname; + rev = version; + hash = "sha256-EQ24OjQZr42C1PFtIXr4yFzYb/M4Tatqu8Zo+9dgtEE="; + }; + + propagatedBuildInputs = [ + argcomplete + requests + ]; + + 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"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ linsui ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aae1202e1a66..1855e0fdab5b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1699,6 +1699,8 @@ with pkgs; sdlookup = callPackage ../tools/security/sdlookup { }; + sdkmanager = with python3Packages; toPythonApplication sdkmanager; + sgrep = callPackage ../tools/text/sgrep { }; shell-genie = callPackage ../applications/misc/shell-genie { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a6e00e1f3f4d..62e4e4fd3041 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10900,6 +10900,8 @@ self: super: with self; { sdds = callPackage ../development/python-modules/sdds { }; + sdkmanager = callPackage ../development/python-modules/sdkmanager { }; + sdnotify = callPackage ../development/python-modules/sdnotify { }; seaborn = callPackage ../development/python-modules/seaborn { };