From patchwork Thu May 9 22:53:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 27248 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 94D0727BBEA; Thu, 9 May 2024 23:57:35 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 B79A727BBE2 for ; Thu, 9 May 2024 23:57:34 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5ChT-0005wn-Ay; Thu, 09 May 2024 18:57:19 -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 1s5ChK-0005sE-Qe for guix-patches@gnu.org; Thu, 09 May 2024 18:57:10 -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 1s5ChK-0006RO-IG for guix-patches@gnu.org; Thu, 09 May 2024 18:57:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5ChI-0002fU-RU for guix-patches@gnu.org; Thu, 09 May 2024 18:57:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70855] [PATCH 17/92] gnu: qtile: Improve package style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2024 22:57:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70855@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 70855-submit@debbugs.gnu.org id=B70855.17152953979898 (code B ref 70855); Thu, 09 May 2024 22:57:08 +0000 Received: (at 70855) by debbugs.gnu.org; 9 May 2024 22:56:37 +0000 Received: from localhost ([127.0.0.1]:41073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Cgn-0002ZZ-6M for submit@debbugs.gnu.org; Thu, 09 May 2024 18:56:37 -0400 Received: from 7.mo561.mail-out.ovh.net ([46.105.57.200]:60823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Cgj-0002Ys-HP for 70855@debbugs.gnu.org; Thu, 09 May 2024 18:56:34 -0400 Received: from director2.ghost.mail-out.ovh.net (unknown [10.108.9.136]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4Vb6ns6xlnz1F8G for <70855@debbugs.gnu.org>; Thu, 9 May 2024 22:56:33 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-2c6g5 (unknown [10.108.42.28]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id B6CA61FD81; Thu, 9 May 2024 22:56:33 +0000 (UTC) Received: from ngraves.fr ([37.59.142.98]) by ghost-submission-6684bf9d7b-2c6g5 with ESMTPSA id JZomKKFUPWbAezIAqbeGSA (envelope-from ); Thu, 09 May 2024 22:56:33 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-98R002e6df6564-a7e2-4dc8-9779-0f62dc543cbd, E63BAB6C0A71DD4DA934779D5D345DF804807214) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Fri, 10 May 2024 00:53:12 +0200 Message-ID: <20240509225530.24649-17-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240509225530.24649-1-ngraves@ngraves.fr> References: <20240509225530.24649-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6098155373563208418 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdeffedgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrdelkeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjedtkeehheesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeiuddpmhhouggvpehsmhhtphhouhht 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: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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 * gnu/packages/wm.scm (qtile): Indent as needed. Light rewrite using format instead of string-append in [arguments]<#:phases>. Ensure lines wrap with intended length. Change-Id: I297718138642d24604743137f3181bfc76a51b54 --- gnu/packages/wm.scm | 72 +++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 3ae4d03839b..a1c94fe13a9 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -597,11 +597,11 @@ (define-public qtile (name "qtile") (version "0.23.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "qtile" version)) - (sha256 - (base32 "1v8rxm2xg2igxv6gwa78wrkxzgfxmxfgflbjdp4fm7cxjdx3zrpa")))) + (origin + (method url-fetch) + (uri (pypi-uri "qtile" version)) + (sha256 + (base32 "1v8rxm2xg2igxv6gwa78wrkxzgfxmxfgflbjdp4fm7cxjdx3zrpa")))) (build-system pyproject-build-system) (arguments (list @@ -611,26 +611,28 @@ (define-public qtile #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "libqtile/pangocffi.py" - (("^gobject = ffi.dlopen.*") - (string-append "gobject = ffi.dlopen(\"" - (assoc-ref inputs "glib") "/lib/libgobject-2.0.so.0\")\n")) - (("^pango = ffi.dlopen.*") - (string-append "pango = ffi.dlopen(\"" - (assoc-ref inputs "pango") "/lib/libpango-1.0.so.0\")\n")) - (("^pangocairo = ffi.dlopen.*") - (string-append "pangocairo = ffi.dlopen(\"" - (assoc-ref inputs "pango") "/lib/libpangocairo-1.0.so.0\")\n"))))) - (add-after 'install 'install-xsession - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (xsessions (string-append out "/share/xsessions")) - (qtile (string-append out "/bin/qtile start"))) - (mkdir-p xsessions) - (copy-file "resources/qtile.desktop" (string-append xsessions "/qtile.desktop")) - (substitute* (string-append xsessions "/qtile.desktop") - (("qtile start") qtile))))) + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "libqtile/pangocffi.py" + (("^(gobject = ffi.dlopen).*" all def) + (format #f "~a(~s)~%" def + (search-input-file inputs "/lib/libgobject-2.0.so.0"))) + (("^(pango = ffi.dlopen).*" all def) + (format #f "~a(~s)~%" def + (search-input-file inputs "/lib/libpango-1.0.so.0"))) + (("^(pangocairo = ffi.dlopen).*" all def) + (format #f "~a(~s)~%" def + (search-input-file + inputs "/lib/libpangocairo-1.0.so.0")))))) + (add-after 'install 'install-xsessions + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (xsessions (string-append out "/share/xsessions")) + (qtile (string-append out "/bin/qtile start"))) + (mkdir-p xsessions) + (copy-file "resources/qtile.desktop" + (string-append xsessions "/qtile.desktop")) + (substitute* (string-append xsessions "/qtile.desktop") + (("qtile start") qtile))))) (add-before 'check 'pre-check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -639,17 +641,17 @@ (define-public qtile (setenv "DISPLAY" ":1") (setenv "XDG_CACHE_HOME" "/tmp"))))))) (inputs - (list glib pango pulseaudio)) + (list glib pango pulseaudio)) (propagated-inputs - (list python-cairocffi - python-cffi - python-dateutil - python-dbus-next - python-iwlib - python-keyring - python-mpd2 - python-pyxdg - python-xcffib)) + (list python-cairocffi + python-cffi + python-dateutil + python-dbus-next + python-iwlib + python-keyring + python-mpd2 + python-pyxdg + python-xcffib)) (native-inputs (list pkg-config python-flake8