From patchwork Mon Jul 24 12:58:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Enge X-Patchwork-Id: 15207 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 500C527BBE9; Mon, 24 Jul 2023 13:59: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 B8F6C27BBE2 for ; Mon, 24 Jul 2023 13:59:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNv9V-0001I0-8m; Mon, 24 Jul 2023 08:59:05 -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 1qNv9T-0001Hc-IA for guix-patches@gnu.org; Mon, 24 Jul 2023 08:59: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 1qNv9S-0000Hh-BI for guix-patches@gnu.org; Mon, 24 Jul 2023 08:59:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNv9S-0006xP-7u for guix-patches@gnu.org; Mon, 24 Jul 2023 08:59: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 12:59: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.169020353226728 (code B ref 64808); Mon, 24 Jul 2023 12:59:02 +0000 Received: (at 64808) by debbugs.gnu.org; 24 Jul 2023 12:58:52 +0000 Received: from localhost ([127.0.0.1]:42103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNv9H-0006x1-SZ for submit@debbugs.gnu.org; Mon, 24 Jul 2023 08:58:52 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]:53136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNv9C-0006wY-VW for 64808@debbugs.gnu.org; Mon, 24 Jul 2023 08:58:48 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2D4671B4F; Mon, 24 Jul 2023 14:58:40 +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 2L1UGF4sKTg6; Mon, 24 Jul 2023 14:58:39 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 619585F0; Mon, 24 Jul 2023 14:58:39 +0200 (CEST) Date: Mon, 24 Jul 2023 14:58:37 +0200 From: Andreas Enge Message-ID: References: <87y1j6o437.fsf@riseup.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87y1j6o437.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 Hello, thanks for the new package! According to our naming scheme, we should either call it "sdkmanager" (the upstream name), or "python-sdkmanager" (as a Python library). Given that it is mainly an executable, I opted for the first one; also since the second one is a bit misleading (it does not manage SDKs for python). I have removed the propagated input gnutls; propagated inputs should be used very sparingly, and so far I did not see where it would be required. I am not sure the package works. When running sdkmanager --sdk_root /tmp/sdk --install it complains that it has no rights on /opt/android-sdk. I was just guessing how it works from "sdkmanager --help"; should --sdk_root not set the place where to install the SDKs? "sdkmanager --list" does seem to work. I am attaching a new version of the patch; what do you think? Andreas From fe501c98e105a0ee76b34737d8071608f130c76b Mon Sep 17 00:00:00 2001 Message-ID: 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 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415 diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index f35c2398bd..f9c24226b8 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,28 @@ (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)) + (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")