all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: Distopico <distopico@riseup.net>
Cc: 64808@debbugs.gnu.org, maxim.cournoyer@gmail.com
Subject: [bug#64808] [PATCH] gnu: Add andorid-sdkmanager.
Date: Mon, 24 Jul 2023 17:43:27 +0200	[thread overview]
Message-ID: <ZL6cH_w_5KfjsAi1@jurong> (raw)
In-Reply-To: <87ttttnyuf.fsf@riseup.net>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Am Mon, Jul 24, 2023 at 09:51:35AM -0500 schrieb Distopico:
> The name change make sense, thank you and ANDROID_HOME is the way
> according with the documentation, but "gnupg" is necessary, if you test
> with `--container -N` you will se the error:
> `FileNotFoundError: [Errno 2] No such file or directory: 'gpgv'`
> after run `sdkmanager --list`, "gpgv" is part of gnupg package, for that
> reason I added it in "propagated-inputs". attached a patch with that
> change.

Ah, I see, of course I did have gnupg in my profile already...
I think a better option is to replace the one occurrence of "gpgv"
in the script by the absolute path to the binary; this also registers
a reference with the package.

Could you test the attached patch, please?

Andreas


[-- Attachment #2: 0001-gnu-Add-sdkmanager.patch --]
[-- Type: text/plain, Size: 2956 bytes --]

From 18c42e27cca61c868fc6b5d06ab8e13cc0a02302 Mon Sep 17 00:00:00 2001
Message-ID: <18c42e27cca61c868fc6b5d06ab8e13cc0a02302.1690213156.git.andreas@enge.fr>
From: Distopico <distopico@riseup.net>
Date: Sun, 23 Jul 2023 13:41:32 -0500
Subject: [PATCH] gnu: Add sdkmanager.

* gnu/packages/android.scm (sdkmanager): New variable.

Co-authored-by: Andreas Enge <andreas@enge.fr>
---
 gnu/packages/android.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index f35c2398bd..b9b8b89208 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +39,7 @@ (define-module (gnu packages android)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system trivial)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
@@ -721,6 +723,35 @@ (define-public fastboot
      "This package provides @command{fastboot}, a tool to upload file system images to Android devices.")
     (license license:asl2.0)))
 
+(define-public sdkmanager
+  (package
+    (name "sdkmanager")
+    (version "0.6.5")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "sdkmanager" version ".tar.gz"))
+              (sha256
+               (base32
+                "11as7n2mj3nbqsqb3ivyv9985n73i022s748qvjg36cs8ig50afx"))))
+    (build-system pyproject-build-system)
+    (inputs (list python-requests python-argcomplete python-urllib3 gnupg))
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-before 'build 'patch-gnupg
+                          (lambda _
+                            (substitute* "sdkmanager.py"
+                              (("gpgv")
+                               (string-append #$(this-package-input "gnupg")
+                                              "/bin/gpgv"))))))))
+    (home-page "https://gitlab.com/fdroid/sdkmanager")
+    (synopsis "Replacement for Android sdkmanager written in Python")
+    (description
+     "This package provides a drop-in replacement for sdkmanager from
+the Android SDK.  It is written in Python and part of the F-Droid
+project.  It implements the exact API of the Android sdkmanager command
+line.  The project also attempts to maintain the same terminal output.")
+    (license license:agpl3+)))
+
 (define-public android-udev-rules
   (package
     (name "android-udev-rules")

base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415
-- 
2.41.0


  reply	other threads:[~2023-07-24 15:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-23 18:41 [bug#64808] [PATCH] gnu: Add andorid-sdkmanager Distopico
2023-07-24 12:58 ` Andreas Enge
2023-07-24 13:04   ` Andreas Enge
2023-07-24 14:51   ` Distopico
2023-07-24 15:43     ` Andreas Enge [this message]
2023-07-24 17:23       ` Distopico
2023-07-24 18:23         ` bug#64808: " Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZL6cH_w_5KfjsAi1@jurong \
    --to=andreas@enge.fr \
    --cc=64808@debbugs.gnu.org \
    --cc=distopico@riseup.net \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.