From patchwork Wed Dec 15 19:40:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 35240 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 2366727BBEA; Wed, 15 Dec 2021 19:57:50 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 A727E27BBE9 for ; Wed, 15 Dec 2021 19:57:49 +0000 (GMT) Received: from localhost ([::1]:40054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxaPM-0007Ew-Pv for patchwork@mira.cbaines.net; Wed, 15 Dec 2021 14:57:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxaB5-0005b7-0u for guix-patches@gnu.org; Wed, 15 Dec 2021 14:43:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxaB4-0001xM-NT for guix-patches@gnu.org; Wed, 15 Dec 2021 14:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxaB4-0007Qd-Dc for guix-patches@gnu.org; Wed, 15 Dec 2021 14:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52521] [PATCH] gnu: Make GNOME Shell Extensions configurable again. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Dec 2021 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52521 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52521@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163959732728476 (code B ref -1); Wed, 15 Dec 2021 19:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Dec 2021 19:42:07 +0000 Received: from localhost ([127.0.0.1]:33752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxaAA-0007PE-Ul for submit@debbugs.gnu.org; Wed, 15 Dec 2021 14:42:07 -0500 Received: from lists.gnu.org ([209.51.188.17]:57188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxaA8-0007Oz-P7 for submit@debbugs.gnu.org; Wed, 15 Dec 2021 14:42:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxaA8-0004OW-J5 for guix-patches@gnu.org; Wed, 15 Dec 2021 14:42:04 -0500 Received: from [2a00:1450:4864:20::442] (port=40945 helo=mail-wr1-x442.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxa9z-0006qW-SS for guix-patches@gnu.org; Wed, 15 Dec 2021 14:42:04 -0500 Received: by mail-wr1-x442.google.com with SMTP id t9so40054165wrx.7 for ; Wed, 15 Dec 2021 11:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:mime-version:to:content-transfer-encoding :message-id; bh=kl2U0JKQoncnJX6onWS2/Oz2ro/JqYWh5NnwSn2AmAU=; b=MnZEnI2GNtE/olMp6Jh8W2bq3Ee817acLTYHqqlgBrWLQai4A/ihOqI72FURjxB6Hu XZ5pdMmZgfCpo4ax7/upzyfJeDTfDhGHztBYMbFo+zuMpGKYYFQmCtVo9toiOqvMd8Fm 6TM31+ICeG3F07J0PbAMTrA4zOiQHkGaQx4409Bax1moHDgQWI97WZSThYlqvom/IA7m gIdmyyiLdPBtHEP5ElwdUDFIH0ENjNtwITwrDYUvFrXoSZwdGBiVjof8spKRVDur5oRM JqvKuj7gggbMohqIOcHTC/heqtcqz3TRP4kqNSMuZLtKt0vDBZzPpE0jxlbBsw6NWcUZ 2/6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version:to :content-transfer-encoding:message-id; bh=kl2U0JKQoncnJX6onWS2/Oz2ro/JqYWh5NnwSn2AmAU=; b=7tKohFv+OFEDiJdnqOMPCaRGDruPfNKUiM/8P15vlHOUfNjBKmSvBBg+jC5UFND2Mr S/LJ7udkLJ/4jcL31+6ZHebQB9JS672p4dkMBqLFhyu635s6/kI1iP4LM1UUOVhG9mPd nQ5LUMQ2ZvyWngRlCem69Q77MnLmDzyQrzPZW5TeBP7D2QCyyu3beu8tr7LWaZ5ppFDc Jg0H7FMKeBg+0JKjrUopoEln5PLKfCvuaZIlQuM9GpWWsOOU6A9klyGz5qu8OAzdn3wR 7c8SnkQiRdYdl3tCZgfWoOVQXn5MYd6asBNzwWW/Yud+cqS5IjJzhnZ359E8yt7DRcVH PjtQ== X-Gm-Message-State: AOAM531otu/mFSd9Ggmr9jf38mb33eBTKRn7QXhkyE7FcKhvcAe5bnFF 4GDrPEUK3eXaRv05z0aW1mP8ThNr8rw= X-Google-Smtp-Source: ABdhPJzyM9YvnVj4JXKzClSfYq3IfENdiVNlgw2NRfRxHQfh3D1RVlgLfdvdxW94b23NzVMuLjIGyQ== X-Received: by 2002:adf:eac8:: with SMTP id o8mr4813615wrn.93.1639597314211; Wed, 15 Dec 2021 11:41:54 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id e7sm3589264wrg.31.2021.12.15.11.41.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 11:41:53 -0800 (PST) From: Liliana Marie Prikler Date: Wed, 15 Dec 2021 20:40:09 +0100 MIME-Version: 1.0 Message-ID: <9594ebfc0ddb823ce5a55724644b42508e00abb2.camel@gmail.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::442 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=liliana.prikler@gmail.com; helo=mail-wr1-x442.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gnome.scm (gnome-shell)[#:phases]: Adjust ‘wrap’ phase, so that “gnome-extensions-app” gets GI_TYPELIB_PATH set. Add ‘rewire’ phase to replace the blurb that deprecated commands print in favour of one that doesn't point towards external packages. --- gnu/packages/gnome.scm | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index bbc768527d..46ab07c7ac 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -8710,14 +8710,38 @@ (define-public gnome-shell (let ((out (assoc-ref outputs "out")) (gi-typelib-path (getenv "GI_TYPELIB_PATH")) (python-path (getenv "GUIX_PYTHONPATH"))) - (wrap-program (string-append out "/bin/gnome-shell") - `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))) + (for-each + (lambda (prog) + (wrap-program (string-append out "/bin/" prog) + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) + '("gnome-shell" "gnome-extensions-app")) + (substitute* (string-append out "/share/gnome-shell/" + "org.gnome.Shell.Extensions") + (("imports\\.package\\.start" all) + (string-append "'" gi-typelib-path "'.split(':').forEach(" + "path => imports.gi.GIRepository.Repository." + "prepend_search_path(path));\n" + all))) (for-each (lambda (prog) (wrap-program (string-append out "/bin/" prog) `("GUIX_PYTHONPATH" ":" prefix (,python-path)) `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) - '("gnome-shell-extension-tool" "gnome-shell-perf-tool"))))) + '("gnome-shell-perf-tool"))))) + (add-after 'install 'rewire + (lambda* (#:key inputs outputs #:allow-other-keys) + (for-each + (lambda (tool) + (call-with-output-file (string-append + (assoc-ref outputs "out") + "/bin/" tool) + (lambda (port) + (format port "#!~a +printf '~a is deprecated. Use the \"gnome-extensions\" CLI or \ +\"gnome-extensions-app\" instead.\\n'" + (search-input-file inputs "bin/bash") + tool)))) + '("gnome-shell-extension-tool" "gnome-shell-extension-prefs")))) (replace 'glib-or-gtk-wrap (let ((wrap (assoc-ref %standard-phases 'glib-or-gtk-wrap))) (lambda* (#:key inputs outputs #:allow-other-keys #:rest rest)