me
/
guix
Archived
1
0
Fork 0

gnu: Add ghc-xmobar

* gnu/packages/wm.scm (ghc-xmobar): New variable.
(xmobar)[inputs]: Remove everything except libxpm.  Add ghc-xmobar.
[arguments]: Disable tests as they are run in ghc-xmobar.  Configure only
the xmobar executable.  Remove unnecessary phases.
[native-inputs]: Remove everything.
Saku Laesvuori 2023-07-07 12:42:04 +03:00 committed by Lars-Dominik Braun
parent fcfdb8f05e
commit ba1fe203b2
No known key found for this signature in database
GPG Key ID: F663943E08D8092A
1 changed files with 26 additions and 8 deletions

View File

@ -877,9 +877,9 @@ used on each workspace. Xinerama is fully supported, allowing windows to be
tiled on several screens.") tiled on several screens.")
(license license:bsd-3))) (license license:bsd-3)))
(define-public xmobar (define-public ghc-xmobar
(package (package
(name "xmobar") (name "ghc-xmobar")
(version "0.46") (version "0.46")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
@ -896,17 +896,18 @@ tiled on several screens.")
ghc-alsa-mixer ghc-alsa-mixer
ghc-dbus ghc-dbus
ghc-hinotify ghc-hinotify
ghc-http ghc-http-client-tls
ghc-http-conduit ghc-http-conduit
ghc-http-types ghc-http-types
ghc-iwlib
ghc-libmpd ghc-libmpd
ghc-netlink ghc-netlink
ghc-cereal
ghc-old-locale ghc-old-locale
ghc-parsec-numbers ghc-parsec-numbers
ghc-regex-compat ghc-regex-compat
ghc-temporary ghc-temporary
ghc-timezone-olson ghc-timezone-olson
ghc-timezone-series
ghc-x11 ghc-x11
ghc-x11-xft ghc-x11-xft
ghc-cairo ghc-cairo
@ -914,18 +915,35 @@ tiled on several screens.")
libxpm)) libxpm))
(arguments (arguments
`(#:configure-flags (list "--flags=all_extensions") `(#:configure-flags (list "--flags=all_extensions")
;; Haddock documentation is for the library.
#:haddock? #f
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'register 'remove-libraries (add-after 'install 'remove-binaries
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(delete-file-recursively (string-append (assoc-ref outputs "out") "/lib")))) (delete-file-recursively (string-append (assoc-ref outputs "out") "/bin"))))
(add-before 'build 'patch-test-shebang (add-before 'build 'patch-test-shebang
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "test/Xmobar/Plugins/Monitors/AlsaSpec.hs" (substitute* "test/Xmobar/Plugins/Monitors/AlsaSpec.hs"
(("/bin/bash") (which "bash")))))))) (("/bin/bash") (which "bash"))))))))
(home-page "https://xmobar.org") (home-page "https://xmobar.org")
(synopsis "Haskell library for minimalistic text based status bars")
(description
"@code{ghc-xmobar} is the haskell library that @code{xmobar} is based on.
It can be used to extend @code{xmobar} with other Haskell code.")
(license license:bsd-3)))
(define-public xmobar
(package
(inherit ghc-xmobar)
(name "xmobar")
(inputs
(list ghc-xmobar
libxpm))
(arguments
`(#:configure-flags (list "--flags=all_extensions" "exe:xmobar")
;; Haddock documentation is for the library.
#:haddock? #f
;; Tests are for the library.
#:tests? #f))
(synopsis "Minimalistic text based status bar") (synopsis "Minimalistic text based status bar")
(description (description
"@code{xmobar} is a lightweight, text-based, status bar written in "@code{xmobar} is a lightweight, text-based, status bar written in