From patchwork Mon Jul 24 15:43:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Enge X-Patchwork-Id: 52166 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 65D6E27BBE2; Mon, 24 Jul 2023 16:44:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0060727BBE2 for ; Mon, 24 Jul 2023 16:44:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNxjB-0005td-B3; Mon, 24 Jul 2023 11:44:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNxj9-0005tU-9Y for guix-patches@gnu.org; Mon, 24 Jul 2023 11:44:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNxj9-0006Hq-1t for guix-patches@gnu.org; Mon, 24 Jul 2023 11:44:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNxj8-0003Nz-Bn for guix-patches@gnu.org; Mon, 24 Jul 2023 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64808] [PATCH] gnu: Add andorid-sdkmanager. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 24 Jul 2023 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64808 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Distopico Cc: 64808@debbugs.gnu.org, maxim.cournoyer@gmail.com Received: via spool by 64808-submit@debbugs.gnu.org id=B64808.169021342012967 (code B ref 64808); Mon, 24 Jul 2023 15:44:02 +0000 Received: (at 64808) by debbugs.gnu.org; 24 Jul 2023 15:43:40 +0000 Received: from localhost ([127.0.0.1]:43824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNxim-0003N5-7o for submit@debbugs.gnu.org; Mon, 24 Jul 2023 11:43:40 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:45662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNxii-0003Mk-Qm for 64808@debbugs.gnu.org; Mon, 24 Jul 2023 11:43:39 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 817871D22; Mon, 24 Jul 2023 17:43:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tkt0ak0ODau8; Mon, 24 Jul 2023 17:43:29 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 37600389; Mon, 24 Jul 2023 17:43:29 +0200 (CEST) Date: Mon, 24 Jul 2023 17:43:27 +0200 From: Andreas Enge Message-ID: References: <87y1j6o437.fsf@riseup.net> <87ttttnyuf.fsf@riseup.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87ttttnyuf.fsf@riseup.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 From 18c42e27cca61c868fc6b5d06ab8e13cc0a02302 Mon Sep 17 00:00:00 2001 Message-ID: <18c42e27cca61c868fc6b5d06ab8e13cc0a02302.1690213156.git.andreas@enge.fr> From: Distopico 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 --- gnu/packages/android.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415 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 ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Petr Hodina +;;; Copyright © 2023 Camilo Q.S. (Distopico) ;;; ;;; 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")