Archived
1
0
Fork 0

gnu: stumpwm: Improve package definition.

* gnu/packages/wm.scm (stumpwm)[inputs, native-inputs]: Remove labels.
  [arguments]: Use gexp and remote trailing #t in phases.
This commit is contained in:
Guillaume Le Vaillant 2022-06-27 11:15:44 +02:00
parent 1967c04226
commit 144a750f8b
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -1832,57 +1832,58 @@ Wayland compositors supporting the wlr-output-management protocol.")
(sha256 (sha256
(base32 "12hf70mpwy0ixiyvv8sf8pkwrzz8nb12a8ybvsdpibsxfjxgxnan")))) (base32 "12hf70mpwy0ixiyvv8sf8pkwrzz8nb12a8ybvsdpibsxfjxgxnan"))))
(build-system asdf-build-system/sbcl) (build-system asdf-build-system/sbcl)
(native-inputs `(("fiasco" ,sbcl-fiasco) (native-inputs
("texinfo" ,texinfo) (list sbcl-fiasco
texinfo
;; To build the manual. ;; To build the manual.
("autoconf" ,autoconf) autoconf
("automake" ,automake))) automake))
(inputs `(("cl-ppcre" ,sbcl-cl-ppcre) (inputs
("clx" ,sbcl-clx) (list sbcl-alexandria
("alexandria" ,sbcl-alexandria))) sbcl-cl-ppcre
sbcl-clx))
(outputs '("out" "lib")) (outputs '("out" "lib"))
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'fix-tests #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'fix-tests
(substitute* "stumpwm-tests.asd" (lambda _
(("\"ALL-TESTS\"") (substitute* "stumpwm-tests.asd"
"\"RUN-PACKAGE-TESTS\" :package")))) (("\"ALL-TESTS\"")
(add-after 'create-asdf-configuration 'build-program "\"RUN-PACKAGE-TESTS\" :package"))))
(lambda* (#:key outputs #:allow-other-keys) (add-after 'create-asdf-configuration 'build-program
(build-program (lambda* (#:key outputs #:allow-other-keys)
(string-append (assoc-ref outputs "out") "/bin/stumpwm") (build-program
outputs (string-append (assoc-ref outputs "out") "/bin/stumpwm")
#:entry-program '((stumpwm:stumpwm) 0)))) outputs
(add-after 'build-program 'create-desktop-file #:entry-program '((stumpwm:stumpwm) 0))))
(lambda* (#:key outputs #:allow-other-keys) (add-after 'build-program 'create-desktop-file
(let* ((out (assoc-ref outputs "out")) (lambda* (#:key outputs #:allow-other-keys)
(xsessions (string-append out "/share/xsessions"))) (let* ((out (assoc-ref outputs "out"))
(mkdir-p xsessions) (xsessions (string-append out "/share/xsessions")))
(call-with-output-file (mkdir-p xsessions)
(string-append xsessions "/stumpwm.desktop") (call-with-output-file
(lambda (file) (string-append xsessions "/stumpwm.desktop")
(format file (lambda (file)
"[Desktop Entry]~@ (format file
Name=stumpwm~@ "[Desktop Entry]~@
Comment=The Stump Window Manager~@ Name=stumpwm~@
Exec=~a/bin/stumpwm~@ Comment=The Stump Window Manager~@
TryExec=~@*~a/bin/stumpwm~@ Exec=~a/bin/stumpwm~@
Icon=~@ TryExec=~@*~a/bin/stumpwm~@
Type=Application~%" Icon=~@
out))) Type=Application~%"
#t))) out))))))
(add-after 'install 'install-manual (add-after 'install 'install-manual
(lambda* (#:key (make-flags '()) outputs #:allow-other-keys) (lambda* (#:key (make-flags '()) outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(info (string-append out "/share/info"))) (info (string-append out "/share/info")))
(invoke "./autogen.sh") (invoke "./autogen.sh")
(invoke "sh" "./configure" "SHELL=sh") (invoke "sh" "./configure" "SHELL=sh")
(apply invoke "make" "stumpwm.info" make-flags) (apply invoke "make" "stumpwm.info" make-flags)
(install-file "stumpwm.info" info) (install-file "stumpwm.info" info)))))))
#t))))))
(synopsis "Window manager written in Common Lisp") (synopsis "Window manager written in Common Lisp")
(description "Stumpwm is a window manager written entirely in Common Lisp. (description "Stumpwm is a window manager written entirely in Common Lisp.
It attempts to be highly customizable while relying entirely on the keyboard It attempts to be highly customizable while relying entirely on the keyboard