[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
152/361: gnu: qtile: Improve package style.
From: |
guix-commits |
Subject: |
152/361: gnu: qtile: Improve package style. |
Date: |
Thu, 21 Nov 2024 06:29:08 -0500 (EST) |
sharlatan pushed a commit to branch python-team
in repository guix.
commit 78de7ff7d355afa44520fd3032694366059146ed
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Fri May 10 00:53:12 2024 +0200
gnu: qtile: Improve package style.
* 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
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
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 bc907fbf40..750c71c3fe 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -603,11 +603,11 @@ subscribe to events.")
(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
@@ -617,26 +617,28 @@ subscribe to events.")
#: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?
@@ -645,17 +647,17 @@ subscribe to events.")
(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
- 50/361: gnu: python-billiard: Add missing inputs., (continued)
- 50/361: gnu: python-billiard: Add missing inputs., guix-commits, 2024/11/21
- 78/361: gnu: python-send2trash: Update to 1.8.2., guix-commits, 2024/11/21
- 101/361: gnu: python-openapi-schema-validator: Update to 0.6.2., guix-commits, 2024/11/21
- 96/361: gnu: Add python-jupyter-events., guix-commits, 2024/11/21
- 128/361: gnu: python-pycurl: Update to 7.45.3., guix-commits, 2024/11/21
- 126/361: gnu: python-sphinx-4: Inherit from python-sphinx-5., guix-commits, 2024/11/21
- 125/361: gnu: python-sphinx-5: Disable failing tests., guix-commits, 2024/11/21
- 102/361: gnu: python-pydata-sphinx-theme: Disable one test., guix-commits, 2024/11/21
- 134/361: gnu: python-jupyterlab-widgets: Update to 3.0.10., guix-commits, 2024/11/21
- 145/361: gnu: vdirsyncer: Move to pyproject-build-system and enable tests., guix-commits, 2024/11/21
- 152/361: gnu: qtile: Improve package style.,
guix-commits <=
- 149/361: gnu: Add ghc-language-python., guix-commits, 2024/11/21
- 147/361: gnu: python-docker-pycreds: Move to pyproject-build-system., guix-commits, 2024/11/21
- 156/361: gnu: conda: Reindent., guix-commits, 2024/11/21
- 181/361: gnu: python-cairosvg: Move to pyproject-build-system., guix-commits, 2024/11/21
- 188/361: gnu: python-nbstripout: Move to pyproject-build-system., guix-commits, 2024/11/21
- 201/361: gnu: python-uqbar: Improve package style., guix-commits, 2024/11/21
- 209/361: gnu: python-fenics-dijitso: Move to pyproject-build-system., guix-commits, 2024/11/21
- 210/361: gnu: python-pyan3: Move to pyproject-build-system., guix-commits, 2024/11/21
- 219/361: gnu: python-notebook: Add python-jupyter-server to native inputs., guix-commits, 2024/11/21
- 223/361: gnu: Remove python-mistune-next., guix-commits, 2024/11/21