diff mbox series

[bug#72937,2/2] gnu: autorandr: Use GEXPs.

Message ID 617d4764936280f3fe24c7928195078f563f255f.1725216784.git.poptsov.artyom@gmail.com
State New
Headers show
Series gnu: autorandr: Update to 1.15. | expand

Commit Message

Artyom V. Poptsov Sept. 1, 2024, 6:55 p.m. UTC
* gnu/packages/xdisorg.scm (autorandr): Use GEXPs.

Change-Id: I476e29ddff17c0180e8a0eeefe818954364eac71
---
 gnu/packages/xdisorg.scm | 45 ++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 23 deletions(-)

Comments

jgart Sept. 4, 2024, 2:10 p.m. UTC | #1
Applied with slight modifications. I used $#output instead of assoc-ref style
diff mbox series

Patch

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index e470ad8c0a..f123b739e7 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -298,29 +298,28 @@  (define-public autorandr
     (inputs
      (list xrandr libxcb))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((xrandr (search-input-file inputs "/bin/xrandr")))
-               (substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
-                 (("/usr") (assoc-ref outputs "out")))
-               (substitute* "autorandr.py"
-                 (("popen\\(\"xrandr") (string-append "popen(\"" xrandr))
-                 (("\\[\"xrandr") (string-append "[\"" xrandr)))
-               (substitute* "contrib/autorandr_launcher/autorandr_launcher.c"
-                 (("/usr/bin/autorandr")
-                  (string-append (assoc-ref outputs "out") "/bin/autorandr")))
-               (setenv "CC" "gcc"))
-             #t))
-         (add-after 'install 'install-contrib
-           (lambda* (#:key outputs #:allow-other-keys)
-             (invoke "make"
-                     (string-append "DESTDIR=" (assoc-ref outputs "out"))
-                     "PREFIX="
-                     "BASH_COMPLETIONS_DIR=etc/bash_completion.d"
-                     "install"
-                     "TARGETS=autorandr launcher manpage bash_completion"))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'build 'configure
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let ((xrandr (search-input-file inputs "/bin/xrandr")))
+                     (substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
+                       (("/usr") (assoc-ref outputs "out")))
+                     (substitute* "autorandr.py"
+                       (("popen\\(\"xrandr") (string-append "popen(\"" xrandr))
+                       (("\\[\"xrandr") (string-append "[\"" xrandr)))
+                     (substitute* "contrib/autorandr_launcher/autorandr_launcher.c"
+                       (("/usr/bin/autorandr")
+                        (string-append (assoc-ref outputs "out") "/bin/autorandr")))
+                     (setenv "CC" "gcc"))))
+               (add-after 'install 'install-contrib
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (invoke "make"
+                           (string-append "DESTDIR=" (assoc-ref outputs "out"))
+                           "PREFIX="
+                           "BASH_COMPLETIONS_DIR=etc/bash_completion.d"
+                           "install"
+                           "TARGETS=autorandr launcher manpage bash_completion"))))))
     (synopsis "Auto-detect connected displays and load appropriate setup")
     (description "Autorandr wraps around xrandr to help with X11
 multi-screen configuration management.  It allows the user to create profiles