From patchwork Mon Jul 24 14:51:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Distopico X-Patchwork-Id: 52164 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 5C93927BBE2; Mon, 24 Jul 2023 15:56:28 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 7515227BBE9 for ; Mon, 24 Jul 2023 15:56:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNwyi-0000u4-5K; Mon, 24 Jul 2023 10:56:04 -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 1qNwyg-0000tw-O4 for guix-patches@gnu.org; Mon, 24 Jul 2023 10:56:02 -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 1qNwyg-0003Xk-9S for guix-patches@gnu.org; Mon, 24 Jul 2023 10:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNwyg-00023Z-6L for guix-patches@gnu.org; Mon, 24 Jul 2023 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64808] [PATCH] gnu: Add andorid-sdkmanager. Resent-From: Distopico Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 24 Jul 2023 14:56: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: Andreas Enge Cc: 64808@debbugs.gnu.org, maxim.cournoyer@gmail.com Received: via spool by 64808-submit@debbugs.gnu.org id=B64808.16902105467882 (code B ref 64808); Mon, 24 Jul 2023 14:56:02 +0000 Received: (at 64808) by debbugs.gnu.org; 24 Jul 2023 14:55:46 +0000 Received: from localhost ([127.0.0.1]:43770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNwyP-000232-PI for submit@debbugs.gnu.org; Mon, 24 Jul 2023 10:55:46 -0400 Received: from mx1.riseup.net ([198.252.153.129]:33004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNwyL-00022m-Dv for 64808@debbugs.gnu.org; Mon, 24 Jul 2023 10:55:45 -0400 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4R8jrl4sTmzDrWC; Mon, 24 Jul 2023 14:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1690210535; bh=b2Dak/uU8jOA4lUE7cJZpzh1QlDxWkjKxpFcUmPRLB4=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=D0mrQM3xPzY22QvRi04x6fYazLtivrfQNaVavOxFckMwqt67TZJz67pLvcFRaX+ys yzO5H0vAjNbqveRDvzIavaMnIufmCM1pXiOQ9HWU2mjUYjdsWf9ELwmZn+amSMNK+5 WvYOk9bjVUArwOPSPcH/N46IIAbC1uQIf+dNiLSs= X-Riseup-User-ID: 7B6116AA722C9390291081BD56AB2092695170162EE142E998C2E750E5E9A5AD Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4R8jrW4YNrzJnsj; Mon, 24 Jul 2023 14:55:23 +0000 (UTC) References: <87y1j6o437.fsf@riseup.net> From: Distopico Date: Mon, 24 Jul 2023 09:51:35 -0500 In-reply-to: Message-ID: <87ttttnyuf.fsf@riseup.net> MIME-Version: 1.0 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 On 2023-07-24, Andreas Enge wrote: > 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 > > [2. text/plain; 0001-gnu-Add-sdkmanager.patch]... 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. From 60c09ab615cb929be2215adc6b85ce3c8cd3fcfa Mon Sep 17 00:00:00 2001 From: Distopico Date: Sun, 23 Jul 2023 13:37:39 -0500 Subject: [PATCH] gnu: Add andorid-sdkmanager. * gnu/packages/android.scm (sdkmanager): New variables. --- gnu/packages/android.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index f35c2398bd..1d36f9aa7d 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. ;;; @@ -52,6 +53,7 @@ (define-module (gnu packages android) #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages python) + #:use-module (guix build-system pyproject) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) @@ -721,6 +723,29 @@ (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)) + (propagated-inputs (list gnupg)) + (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: 13cb9b302868b5a966a6ae177412c474084f4bf1 -- 2.41.0