From patchwork Sun Dec 4 22:15:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 45049 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 77C9327BBE9; Sun, 4 Dec 2022 22:16:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, 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 2866B27BBEB for ; Sun, 4 Dec 2022 22:16:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1xHH-0007l4-U7; Sun, 04 Dec 2022 17:16:03 -0500 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 1p1xHG-0007kg-GK for guix-patches@gnu.org; Sun, 04 Dec 2022 17:16:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1xHG-0002mc-6S for guix-patches@gnu.org; Sun, 04 Dec 2022 17:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1xHF-0003QD-O9 for guix-patches@gnu.org; Sun, 04 Dec 2022 17:16:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59825] [PATCH] gnu: Add flatpak-xdg-utils. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Dec 2022 22:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59825 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59825@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.167019215113141 (code B ref -1); Sun, 04 Dec 2022 22:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Dec 2022 22:15:51 +0000 Received: from localhost ([127.0.0.1]:60123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1xH5-0003Pt-Dt for submit@debbugs.gnu.org; Sun, 04 Dec 2022 17:15:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:60048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1xH2-0003Pn-Tv for submit@debbugs.gnu.org; Sun, 04 Dec 2022 17:15:49 -0500 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 1p1xGv-0007ie-6S for guix-patches@gnu.org; Sun, 04 Dec 2022 17:15:48 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1xGo-0002J7-BN for guix-patches@gnu.org; Sun, 04 Dec 2022 17:15:36 -0500 Date: Sun, 04 Dec 2022 22:15:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1670192131; x=1670451331; bh=68fEtmOOfQ/hNN5UMDAevlF385BrQ2w3sFxGE/lisHE=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=R+CIwD5Cl4IjhuJswH9MtOkmQNPB3yWxu/qWka3Iwp4c0KXcHm8GUwgYrlh1lx14x Icq+WjSkVTlPI0t7L0+Znd0RfizN3RIC5214FV7X7mWkouaq4ClF23l1OwVR5kz/6m 626jXK3T5bwI/gpXZVksGl5QEgEqrnsLjFqYuuFZtR4VKMMqRZEb5jYLfTWtA3SFkZ sYXz/n2VrxNZRP9ErQgjBB3CM+Rz1JdNSr0WB4iDnOgW31BaqsvxmpUGZyPczmm/Yj vMTn6M7m6zXZPn1DXaWjnI9MSfLgFAXiU7nTVwLOt1QkfqHAjiPcILaewYwvFx1jzz OMMkGC/juG8Kg== Message-ID: <87wn764xzf.fsf@protonmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.133; envelope-from=john.kehayias@protonmail.com; helo=mail-40133.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias 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 Hi Guix, Here is a little package from the Flatpak folks which is also useful in a guix shell container. This lets you run, for example, xdg-open in the container and it will open on the host side. So let's say you come across a URL, you can just use xdg-open from this package so it will open in the host's web browser, rather than trying in the container. This relies on having portals on the host side, like xdg-desktop-portal-gtk. Here is a simple test example: --8<---------------cut here---------------start------------->8--- guix shell -NC flatpak-xdg-utils --preserve='^DBUS_SESSION_BUS_ADDRESS$' -- xdg-open "" --8<---------------cut here---------------end--------------->8--- which will open Guix's website on the host side. I've checked it works, the license (some files LGPL2+ other LGPL2.1+), linted, and styled. I adjusted the description from upstream slightly to indicate it is not just for Flatpak sandboxes. Thanks! John From 8669a7fb0e1b9ba320c6312d7423500a56236edc Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Sun, 4 Dec 2022 17:06:19 -0500 Subject: [PATCH] gnu: Add flatpak-xdg-utils. * gnu/packages/freedesktop.scm (flatpak-xdg-utils): New variable. --- gnu/packages/freedesktop.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 077d56ad3d..073bc1e754 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -2530,6 +2530,40 @@ (define-public snixembed @end itemize") (license license:isc))) +(define-public flatpak-xdg-utils + (package + (name "flatpak-xdg-utils") + (version "1.0.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/flatpak/flatpak-xdg-utils") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1q8wsc46fcjm737hz10jvgci5wl9sz8hj9aix2y2zdj11bqib9af")))) + (build-system meson-build-system) + (arguments + (list #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "dbus-run-session" "--" "meson" "test" + "--print-errorlogs"))))))) + (inputs (list glib)) + (native-inputs (list dbus pkg-config)) + (synopsis + "Simple portal-based commandline tools for use inside sandboxes") + (description + "This package contains a number of commandline utilities for use inside +Flatpak sandboxes and other containers, like @command{guix shell --container}. +They work by talking to portals. Currently, there is flatpak-spawn for +running commands in sandboxes as well as xdg-open and xdg-email, which are +compatible with the well-known scripts of the same name.") + (home-page "https://github.com/flatpak/flatpak-xdg-utils") + (license (list license:lgpl2.0+ license:lgpl2.1+)))) + (define-public libportal (package (name "libportal") -- 2.38.1