From patchwork Wed Nov 10 01:39:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 34372 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 B807327BBE3; Wed, 10 Nov 2021 01:40:52 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 75C6327BBE1 for ; Wed, 10 Nov 2021 01:40:52 +0000 (GMT) Received: from localhost ([::1]:41022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkcbb-0002YS-Kc for patchwork@mira.cbaines.net; Tue, 09 Nov 2021 20:40:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkcao-0002XJ-SV for guix-patches@gnu.org; Tue, 09 Nov 2021 20:40:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkcao-0005JV-B0 for guix-patches@gnu.org; Tue, 09 Nov 2021 20:40:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mkcao-0000xj-9U for guix-patches@gnu.org; Tue, 09 Nov 2021 20:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51737] [PATCH 4/4] gnu: Add waydroid. References: In-Reply-To: Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Nov 2021 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51737 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: "51737@debbugs.gnu.org" <51737@debbugs.gnu.org> Received: via spool by 51737-submit@debbugs.gnu.org id=B51737.16365083593638 (code B ref 51737); Wed, 10 Nov 2021 01:40:02 +0000 Received: (at 51737) by debbugs.gnu.org; 10 Nov 2021 01:39:19 +0000 Received: from localhost ([127.0.0.1]:36397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkca6-0000wW-Nn for submit@debbugs.gnu.org; Tue, 09 Nov 2021 20:39:19 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:39399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkcZz-0000w1-Oq for 51737@debbugs.gnu.org; Tue, 09 Nov 2021 20:39:17 -0500 Date: Wed, 10 Nov 2021 01:39:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1636508345; bh=dxbyBxxF8rfjzLL/WjIGq9/90GdU4T95YDhjXgQO7lU=; h=Date:To:From:Reply-To:Subject:From; b=gzzuQ8Mx1Zay8BrnHAzt35ShpbU+gsjzsW31xV/nByvXe9Vy36xDeQNh4z3bTReE+ 4NjG8w2soVw6hMGi32WYDSX2WdeyQQcYyeg8LCUP2IfUYnoudipIusnyLJs5u1kZlp HHABycfJcYsWAo724Or5ci4ZhU7Vha3IP6/FHQyg= Message-ID: <5RLyma8o5V0_Xhn_sSJGxZYF4XMzJtrEna-xE5UU-suoRiBa7vaxBdDUEBgKSBMb94O68CnqEzPkcuFA4qasS4rHR4lh-ch-S1k-mFn6d4U=@protonmail.com> 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" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches * gnu/packages/virtualization.scm (waydroid): New variable. --- 2.33.1 diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 1817f6dc22..d47d8402f6 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2005,6 +2005,72 @@ (define-public bochs DOS or Microsoft Windows.") (license license:lgpl2.0+))) +(define-public waydroid + (package + (name "waydroid") + (version "1.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/waydroid/waydroid") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03d87sh443kn0j2mpih1g909khkx3wgb04h605f9jhd0znskkbmw")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'build) ; no setup.py + (delete 'check) ; no test suite + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/waydroid")) + (tools (string-append lib "/tools")) + (data (string-append lib "/data")) + (apps (string-append out "/share/applications")) + (bin (string-append out "/bin")) + (site (string-append out "/lib/python" + ,(version-major+minor + (package-version python)) + "/site-packages")) + (path (getenv "PYTHONPATH"))) + (mkdir-p tools) + (mkdir-p data) + (mkdir-p apps) + (mkdir-p bin) + (copy-recursively "tools" tools) + (copy-recursively "data" data) + (install-file (string-append data "/Waydroid.desktop") + (string-append apps)) + (substitute* (string-append apps "/Waydroid.desktop") + (("/usr") lib)) + (install-file "waydroid.py" lib) + (symlink (string-append lib "/waydroid.py") (string-append bin + "/waydroid.py")) + (wrap-program (string-append bin "/waydroid.py") + `("PYTHONPATH" ":" prefix (,site ,path))))))))) + (inputs `(("bash-minimal" ,bash-minimal) + ("dnsmasq" ,dnsmasq) + ("libgbinder" ,libgbinder) + ("lxc" ,lxc) + ("nftables" ,nftables) + ("python" ,python) + ("python-gbinder" ,python-gbinder) + ("python-pygobject" ,python-pygobject))) + (home-page "https://waydro.id") + (synopsis "Container-based approach to boot a full Android system") + (description "Waydroid uses Linux namespaces @code{(user, pid, uts, net, +mount, ipc)} to run a full Android system in a container and provide Android +applications. The Android inside the container has direct access to needed +underlying hardware. The Android runtime environment ships with a minimal +customized Android system image based on LineageOS. The used image is +currently based on Android 10.") + (license license:gpl3))) + (define-public xen (package (name "xen")