From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id uA+CBtVzGWZASgAAqHPOHw:P1 (envelope-from ) for ; Fri, 12 Apr 2024 19:48:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uA+CBtVzGWZASgAAqHPOHw (envelope-from ) for ; Fri, 12 Apr 2024 19:48:05 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=Xa8aJgBo; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712944085; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TvxcQOT0U7/5a+lRzx5b+CldPVBTfaf0CNq9T311BY0=; b=stkEkhLOAiPTMOh++9XaDd9sJJfQ1aiHa+L8o1kMPvA+pPBIom8bLrzJawuUQgO6WuHanN GkdIN8xQtea015zdEUpQlPZLbn1bW7QjaaliwCT8/3Fq58h5NZIh7YUfZ5EbYG1MJzpcac epLAyZy6zvm2HV4GVmJT2DXYODpgfrHke/E6nip1spEePQiaYsmqQ0lGN/bEc3/wgD86Bm i7xfZgVkzWpGBcrE39Ty76r6rUBknNKzW6jJX46wPvzZujzPThcJ4FZ7fXmfz4pG40ElHU 7E/xF2z2LMTXIU+71W/L31gEGtox3eo2HUSeQ76lhSG/dE+Mza6mXJi2lx91Sg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712944085; a=rsa-sha256; cv=none; b=NLV8Ufa8gs4sGCHE+fFV+Hriatk8PEFYKaPzNxvn1S4gC3JukBCoz3GsEVAZ2IcMOyc1rY WxIU3nBFoaBRhtYtYsDoFASwrd8zsWo8OXFcqRgV22gH9h9cozE2UntUTgAPcEb2wo959f DFgIkTpJknrZUNRVnS4XOLj8Gbis5w5SkKJi/D5ZcvmYM06TXHwRJfDcJ1nEsRHCSJpfIl 4RB3ke+Vx/VPF3nGNsneH8HsoPTKEg+TeBxODBacrkkP+aqnE0E1tfkeR1smQ91c6IkPwV 2QJAdRywPKEs+uQRj5WH9EYn8bkl+wwYPjPsfPMPstFzUBZ4wOpRGa6VnUJgjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=Xa8aJgBo; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5E52F63AB1 for ; Fri, 12 Apr 2024 19:48:04 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvL0G-00015q-LM; Fri, 12 Apr 2024 13:47:56 -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 1rvL0F-00013i-3N for guix-patches@gnu.org; Fri, 12 Apr 2024 13:47:55 -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 1rvL0E-00074Y-RU for guix-patches@gnu.org; Fri, 12 Apr 2024 13:47:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvL0N-0007YT-UE; Fri, 12 Apr 2024 13:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70282] [PATCH v2] gnu: gnome-shell: Wrap screencast service. References: In-Reply-To: Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Fri, 12 Apr 2024 17:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70282 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70282@debbugs.gnu.org Cc: Dariqq , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 70282-submit@debbugs.gnu.org id=B70282.171294407628950 (code B ref 70282); Fri, 12 Apr 2024 17:48:03 +0000 Received: (at 70282) by debbugs.gnu.org; 12 Apr 2024 17:47:56 +0000 Received: from localhost ([127.0.0.1]:59536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvL0E-0007WJ-1e for submit@debbugs.gnu.org; Fri, 12 Apr 2024 13:47:56 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvL09-0007UC-5s for 70282@debbugs.gnu.org; Fri, 12 Apr 2024 13:47:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D1FF5240027 for <70282@debbugs.gnu.org>; Fri, 12 Apr 2024 19:47:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712944052; bh=X2oid8sEb/Fk4KzGWLK2HSxty+Sad10oPwbPpPM7h7g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=Xa8aJgBo10/lKVuN8IXd26T0EL1K72svdW27a28MDbzWbDZ3o3UVxWmqMCX5oXBej zxCM4p0SaEVjtcl+7z4tV1TfV4hBCxEYkRuAhVwDNHyWKR+uDoSn23RH0ydyr29+Rb y7CvOSDZj/VMOrnjTQnjMgOXbZmqPEkYoHnO5KeFkyepG+3sh0X82t97NJMOdQThrQ 20XSKX93H7TOf1pX5RfO1sx5R90dNX9yfWy+ciynstObB7dfTcqzB211j/Qh8x10Ca h/PWgG/ZYa9l58WEYaps96Tvrkm8damhNZtlNOUsYUji/tZcQ9uGi1cOFCsBSGH0Fe oWz3isieXwJQg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VGPCm2Bvbz9rxG; Fri, 12 Apr 2024 19:47:32 +0200 (CEST) From: Dariqq Date: Fri, 12 Apr 2024 17:26:48 +0000 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 5.42 X-Spam-Score: 5.42 X-Migadu-Queue-Id: 5E52F63AB1 X-Migadu-Scanner: mx12.migadu.com X-TUID: oe74W7qPVkt7 The screencast service can now find typelibs and gstreamer plugins. * gnu/packages/linux.scm (gnome-shell) [inputs]: Add gst-plugins-good and pipewire. [#:phases]<'wrap-programs>: Create a wrapper for screencast service and use it. Change-Id: I2c31bf1bd92e281b86c57b06988c6a3793a58d40 --- Hi, Here is v2 of the patch. The wrapper is now created manually as I was unable to find a way to manipulate the gstreamer plugin load path from within javascript. Importantly this leaves the original javascript file untouched and therefore circumvents the argv[0] problem in v1. All the required gstreamer plugins (pipewire and gst-plugins-good) are now inputs and are in the wrapper via GST_PLUGIN_SYSTEM_PATH. I've also left a comment for the required home-pipewire-service. In gnome-shell 45+ the invocation has changed to 'gjs -m service'. Should this also be a comment somewhere? gnu/packages/gnome.scm | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4934ade3dd..d68624344f 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9381,6 +9381,7 @@ (define-public gnome-shell (add-after 'install 'wrap-programs (lambda* (#:key inputs #:allow-other-keys) (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")) + (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")) (python-path (string-join (filter (lambda (item) @@ -9405,7 +9406,39 @@ (define-public gnome-shell (wrap-program (string-append #$output "/bin/" prog) `("GUIX_PYTHONPATH" ":" prefix (,python-path)) `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) - '("gnome-shell-perf-tool"))))) + '("gnome-shell-perf-tool")) + ;; Make a wrapper for the screencast service + ;; Requires a pipewire service running + ;; (i.e. as provided by home-pipewire-service-type) + (let* ((screencast "org.gnome.Shell.Screencast") + (dir (string-append #$output "/share/gnome-shell/")) + (dbus-service-dir (string-append #$output + "/share/dbus-1/" + "services/")) + (wrapper (string-append dir screencast "-wrapper"))) + (call-with-output-file wrapper + (lambda (port) + (format port + (string-append + "#!~a~%" + "export GI_TYPELIB_PATH=~a~%" + "export GST_PLUGIN_SYSTEM_PATH=~a~%" + "exec \"~a\" \"~a\" \"$@\"~%") + (which "bash") + (format #f "\"~a${~a:+:}$~a\"" + gi-typelib-path + "GI_TYPELIB_PATH" "GI_TYPELIB_PATH") + (format #f "\"~a${~a:+:}$~a\"" + gst-plugin-path + "GST_PLUGIN_SYSTEM_PATH" + "GST_PLUGIN_SYSTEM_PATH") + (string-append #$(this-package-input "gjs") + "/bin/gjs") + (string-append dir screencast)))) + (chmod wrapper #o555) + (substitute* (string-append dbus-service-dir screencast + ".service") + (("Exec=.*") (string-append "Exec=" wrapper "\n"))))))) (add-after 'install 'rewire (lambda* (#:key inputs #:allow-other-keys) (for-each @@ -9465,6 +9498,7 @@ (define-public gnome-shell gnome-settings-daemon graphene gst-plugins-base + gst-plugins-good ibus libcanberra libcroco @@ -9475,6 +9509,7 @@ (define-public gnome-shell mesa-headers mutter network-manager-applet + pipewire polkit pulseaudio python-pygobject base-commit: 3dc26b4eaed448cbc02a80bafb2ebb6d908f2b4e -- 2.41.0