[PATCH] gnu: xmonad-next: Change #:phases to gexp.

DoneSubmitted by Daniel Meißner.
Details
3 participants
  • Daniel Meißner
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Severity
normal
D
D
Daniel Meißner wrote on 30 Mar 20:02 +0200
(address . guix-patches@gnu.org)(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
20220330180234.5533-1-daniel.meissner-i4k@ruhr-uni-bochum.de
* gnu/packages/wm.scm (xmonad-next)[arguments]: Use #$output instead of
%output and $#(package-name this-package) and $#(package-synopsis
this-package) instead of name and synopsis.
---
gnu/packages/wm.scm | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 3de760d7a6..d6e27f0677 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -51,6 +51,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -758,22 +759,24 @@ (define-public xmonad-next
     (inputs (list ghc-data-default-class ghc-setlocale ghc-x11))
     (native-inputs (list ghc-quickcheck ghc-quickcheck-classes))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after
-          'install 'install-xsession
-          (lambda _
-            (let* ((xsessions (string-append %output "/share/xsessions")))
-              (mkdir-p xsessions)
-              (call-with-output-file
-                  (string-append xsessions "/xmonad.desktop")
-                (lambda (port)
-                  (format port "~
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'install-xsession
+                 (lambda _
+                   (let ((xsessions (string-append #$output "/share/xsessions")))
+                     (mkdir-p xsessions)
+                     (call-with-output-file (string-append xsessions
+                                                           "/xmonad.desktop")
+                       (lambda (port)
+                         (format port "~
                     [Desktop Entry]~@
                     Name=~a~@
                     Comment=~a~@
                     Exec=~a/bin/xmonad~@
-                    Type=Application~%" ,name ,synopsis %output)))))))))
+                    Type=Application~%"
+                                 #$(package-name this-package)
+                                 #$(package-synopsis this-package)
+                                 #$output)))))))))
     (home-page "https://xmonad.org")
     (description
      "Xmonad is a tiling window manager for X.  Windows are arranged
-- 
2.34.0
M
M
Maxime Devos wrote on 30 Mar 20:44 +0200
671853d0f3772a4d4fdd7d8ba4ba9a442016fe18.camel@telenet.be
Daniel Meißner via Guix-patches via schreef op wo 30-03-2022 om 20:02
[+0200]:
Toggle quote (3 lines)
> +                                 #$(package-name this-package)
> +                                 #$(package-synopsis this-package)

These can be simplified to

#$name
#$synopsis

No need to use package-name/package-synopsis here.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkSlCRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tV6AP0fAG4p4UClkSEuOAFh2js9p8sh
5ikxnff1HqDi7aq69AEAh2EpyoFbiION7FnafcvNjCfUt8WvAvJjtbWf213feQU=
=dkO1
-----END PGP SIGNATURE-----


D
D
Daniel Meißner wrote on 30 Mar 22:53 +0200
[PATCH v2] gnu: xmonad-next: Change #:phases to gexp.
(address . 54641@debbugs.gnu.org)
20220330205334.8978-1-daniel.meissner-i4k@ruhr-uni-bochum.de
* gnu/packages/wm.scm (xmonad-next)[arguments]: Use #$output instead of
%output and $#(package-name this-package) and $#(package-synopsis
this-package) instead of name and synopsis.
---
gnu/packages/wm.scm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

Thanks for your suggestions, Maxime.

Toggle diff (48 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 3de760d7a6..036665f7f0 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -51,6 +51,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -758,22 +759,21 @@ (define-public xmonad-next
     (inputs (list ghc-data-default-class ghc-setlocale ghc-x11))
     (native-inputs (list ghc-quickcheck ghc-quickcheck-classes))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after
-          'install 'install-xsession
-          (lambda _
-            (let* ((xsessions (string-append %output "/share/xsessions")))
-              (mkdir-p xsessions)
-              (call-with-output-file
-                  (string-append xsessions "/xmonad.desktop")
-                (lambda (port)
-                  (format port "~
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'install-xsession
+                 (lambda _
+                   (let ((xsessions (string-append #$output "/share/xsessions")))
+                     (mkdir-p xsessions)
+                     (call-with-output-file (string-append xsessions
+                                                           "/xmonad.desktop")
+                       (lambda (port)
+                         (format port "~
                     [Desktop Entry]~@
                     Name=~a~@
                     Comment=~a~@
                     Exec=~a/bin/xmonad~@
-                    Type=Application~%" ,name ,synopsis %output)))))))))
+                    Type=Application~%" #$name #$synopsis #$output)))))))))
     (home-page "https://xmonad.org")
     (description
      "Xmonad is a tiling window manager for X.  Windows are arranged
-- 
2.34.0
D
D
Daniel Meißner wrote on 1 Apr 09:57 +0200
[PATCH v3] gnu: xmonad-next: Change #:phases to gexp.
(address . 54641@debbugs.gnu.org)
20220401075758.28480-1-daniel.meissner-i4k@ruhr-uni-bochum.de
* gnu/packages/wm.scm (xmonad-next)[arguments]: Use #$output, #$name
and #$synopsis instead of %output, name and synopsis.
---
gnu/packages/wm.scm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

Sorry, I missed to change the commit message also. This one should be
alright.

Toggle diff (48 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 3de760d7a6..036665f7f0 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -51,6 +51,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -758,22 +759,21 @@ (define-public xmonad-next
     (inputs (list ghc-data-default-class ghc-setlocale ghc-x11))
     (native-inputs (list ghc-quickcheck ghc-quickcheck-classes))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after
-          'install 'install-xsession
-          (lambda _
-            (let* ((xsessions (string-append %output "/share/xsessions")))
-              (mkdir-p xsessions)
-              (call-with-output-file
-                  (string-append xsessions "/xmonad.desktop")
-                (lambda (port)
-                  (format port "~
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'install-xsession
+                 (lambda _
+                   (let ((xsessions (string-append #$output "/share/xsessions")))
+                     (mkdir-p xsessions)
+                     (call-with-output-file (string-append xsessions
+                                                           "/xmonad.desktop")
+                       (lambda (port)
+                         (format port "~
                     [Desktop Entry]~@
                     Name=~a~@
                     Comment=~a~@
                     Exec=~a/bin/xmonad~@
-                    Type=Application~%" ,name ,synopsis %output)))))))))
+                    Type=Application~%" #$name #$synopsis #$output)))))))))
     (home-page "https://xmonad.org")
     (description
      "Xmonad is a tiling window manager for X.  Windows are arranged
-- 
2.34.0
L
L
Ludovic Courtès wrote on 5 Apr 14:10 +0200
Re: bug#54641: [PATCH] gnu: xmonad-next: Change #:phases to gexp.
(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
87lewjpw6v.fsf_-_@gnu.org
Hi,

Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:

Toggle quote (3 lines)
> * gnu/packages/wm.scm (xmonad-next)[arguments]: Use #$output, #$name
> and #$synopsis instead of %output, name and synopsis.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 54641@debbugs.gnu.org