diff options
author | Nicolas Graves <ngraves@ngraves.fr> | 2024-05-10 00:53:12 +0200 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-13 20:18:49 +0000 |
commit | 80a0bd2586f6b9e5ca189f5e32ddf111a5d880be (patch) | |
tree | 4179a41810bb0784f857387a9a90a536047348bf | |
parent | cfc9e96381edd973c8b7de8f2b489eb5c8fab82c (diff) | |
download | guix-80a0bd2586f6b9e5ca189f5e32ddf111a5d880be.tar guix-80a0bd2586f6b9e5ca189f5e32ddf111a5d880be.tar.gz |
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>
-rw-r--r-- | gnu/packages/wm.scm | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index fd09f3dad1..cee01e621e 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -683,11 +683,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 @@ -697,26 +697,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? @@ -725,17 +727,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 |