From patchwork Sat Aug 13 06:54:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41595 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 3ADB927BBEA; Sat, 13 Aug 2022 07:56:34 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, 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 7079027BBE9 for ; Sat, 13 Aug 2022 07:56:33 +0100 (BST) Received: from localhost ([::1]:43280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4S-00056C-Ki for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0004kj-0S for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl3y-0006Wq-O2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl3y-0006rX-Hb for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 05/14] gnu: lightdm-gtk-greeter: Use the glib-or-gtk-wrap phase as-is. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370426250 (code B ref 57168); Sat, 13 Aug 2022 06:56:02 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:04 +0000 Received: from localhost ([127.0.0.1]:59514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl31-0006p6-IX for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:41902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2n-0006mE-S0 for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:52 -0400 Received: by mail-qt1-f170.google.com with SMTP id c20so2284000qtw.8 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=NfxYnVMBDKwC3S3wtETK/t09AnB2xGS/W9uiZamrKD0=; b=ZrLX+amxdgNLSe4HIlMKqCerpS1zpDkEx3rWNhgNdA0hvCcGhBvnWGJ9pweWsKrAVT W+lMB6KVfW4PMzFeqZxXpGZPnhB10S/Dl6e0uJbRAUXFM8aLwFwUnChgAeynUeARg7V5 BTGkUX+pSbxRt5KuoHkcCvQvS65QABfxgYVm+AyJHsilRb34bEiU6P6qxQdhU1AzSBgH ZeYs47pvsja4wD3PiWuhc11MV6D5niCaxmSWjHtsYbI1UMZyLJj3Owqk3JhiMdAn2HCS ni8in7Jbz2oA44Fend5zkRVfifWRuHd6OcXseEnnjt/aJms+2I0LkHyIgQM5zwBsGQXi M7gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=NfxYnVMBDKwC3S3wtETK/t09AnB2xGS/W9uiZamrKD0=; b=7vPXd5QPLcdDV0uMPJPoK16cFkQnWRArMCwsl9lV7lBwwOQxY8YaSoOOVYm9Mh2sVf 95F84V1We9qxQfTJpsZ6rY6sMFiu9iIAWa+Cp9HdOyzZhnaIcOdWith9Oyy0VMSYvENX j5fNttE7yBsyliwNTkkihStQdU/GjguWAiyy8TXet/GNqrc6VBb42VX4zVRrZ6K78Y1X 4VUTpZvCNM3YIZ1wNQ4EVMij2/FSSR0y0XZVAYLVlq3ql1Y9tfEqGAxS4SWf1OKpQ9RG rO+lq2u3Rh67r8Td0kS2oOPQpirkpZP9T3KDdO/P7LhlIBQpujV4ES3t6/d6N8w+eOeO LqJw== X-Gm-Message-State: ACgBeo3XIbn+6IGrQVnNE6GUm8vBnxexcBIbad/Di+HGnuMAGXruae68 /TOPVFSEcATP0yW6mEIcuD4EW4ydGSg= X-Google-Smtp-Source: AA6agR7e1kIzEC8ObqJ19/rdUfarR8p5VmzrUsdCuryifLYxLWgGMZ04a5z+QmIc8ixzALbdx2Z7gg== X-Received: by 2002:ac8:5e52:0:b0:338:ce27:7a9d with SMTP id i18-20020ac85e52000000b00338ce277a9dmr6596490qtx.559.1660373684092; Fri, 12 Aug 2022 23:54:44 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:43 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:24 -0400 Message-Id: <20220813065433.27319-5-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/display-managers.scm (lightdm-gtk-greeter) [configure-flags]: Install binaries to bin/, so the wrap phase of glib-or-gtk handles them. [phases]{wrap-program}: Delete. {custom-wrap}: New phase, wrapping the wrapper with a few extra environment variables. --- gnu/packages/display-managers.scm | 54 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 53002f2122..11d5c519ea 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -54,6 +54,7 @@ (define-module (gnu packages display-managers) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages image) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages linux) @@ -353,6 +354,9 @@ (define-public lightdm-gtk-greeter (list #:configure-flags #~(list "--disable-indicator-services-command" ;requires upstart + ;; Put the binary under /bin rather than /sbin, so that it gets + ;; wrapped by the glib-or-gtk-wrap phase. + (string-append "--sbindir=" #$output "/bin") (string-append "--enable-at-spi-command=" (search-input-file %build-inputs "libexec/at-spi-bus-launcher"))) @@ -367,35 +371,29 @@ (define-public lightdm-gtk-greeter (("Exec=lightdm-gtk-greeter") (string-append "Exec=" (search-input-file - outputs "sbin/lightdm-gtk-greeter")))))) - (add-after 'fix-.desktop-file 'wrap-program - ;; Mimic glib-or-gtk build system which doesn't wrap files in - ;; /sbin. - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((gtk #$(this-package-input "gtk+")) - (shared-mime-info #$(this-package-input "shared-mime-info")) - (glib #$(this-package-input "glib"))) - (wrap-program (search-input-file - outputs "sbin/lightdm-gtk-greeter") - ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is - ;; available at all times even outside of profiles, such as - ;; when used in the lightdm-service-type. Otherwise, it - ;; wouldn't be able to display its own icons. - `("GDK_PIXBUF_MODULE_FILE" = - (,(search-input-file - inputs - "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) - `("XDG_DATA_DIRS" ":" prefix - ,(cons "/run/current-system/profile/share" - (map (lambda (pkg) - (string-append pkg "/share")) - (list gtk shared-mime-info glib)))) - `("GTK_PATH" ":" prefix (,gtk)) - `("GIO_EXTRA_MODULES" ":" prefix (,gtk)) - '("XCURSOR_PATH" ":" prefix - ("/run/current-system/profile/share/icons"))))))))) + outputs "bin/lightdm-gtk-greeter")))))) + (add-after 'glib-or-gtk-wrap 'custom-wrap + (lambda* (#:key outputs #:allow-other-keys) + (wrap-script (search-input-file + outputs "bin/lightdm-gtk-greeter") + ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is + ;; available at all times even outside of profiles, such as + ;; when used in the lightdm-service-type. Otherwise, it + ;; wouldn't be able to display its own icons. + `("GDK_PIXBUF_MODULE_FILE" = + (,(search-input-file + outputs + "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) + `("XDG_DATA_DIRS" ":" prefix + (,(string-append "/run/current-system/profile/share:" + (getenv "XDG_DATA_DIRS")))) + '("XCURSOR_PATH" ":" prefix + ("/run/current-system/profile/share/icons")))))))) (native-inputs - (list exo intltool pkg-config xfce4-dev-tools)) + (list exo + intltool + pkg-config + xfce4-dev-tools)) (inputs (list at-spi2-core bash-minimal ;for wrap-program