all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Saku Laesvuori via Guix-patches via <guix-patches@gnu.org>
To: Lars-Dominik Braun <lars@6xq.net>
Cc: 63799@debbugs.gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#63799] [PATCH v2] gnu: Add ghc-xmobar
Date: Fri, 7 Jul 2023 12:42:04 +0300	[thread overview]
Message-ID: <20230707094204.ipay3bqnksyx3eci@X-kone> (raw)
In-Reply-To: <ZKKF9deRq6l9WiNT@noor>

[-- Attachment #1: Type: text/plain, Size: 3569 bytes --]

* 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.
---
 gnu/packages/wm.scm | 43 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 46a1030490..728c9454c6 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -877,9 +877,9 @@ (define-public xmonad
 tiled on several screens.")
     (license license:bsd-3)))
 
-(define-public xmobar
+(define-public ghc-xmobar
   (package
-    (name "xmobar")
+    (name "ghc-xmobar")
     (version "0.46")
     (source (origin
               (method url-fetch)
@@ -896,17 +896,18 @@ (define-public xmobar
            ghc-alsa-mixer
            ghc-dbus
            ghc-hinotify
-           ghc-http
+           ghc-http-client-tls
            ghc-http-conduit
            ghc-http-types
-           ghc-iwlib
            ghc-libmpd
            ghc-netlink
+           ghc-cereal
            ghc-old-locale
            ghc-parsec-numbers
            ghc-regex-compat
            ghc-temporary
            ghc-timezone-olson
+           ghc-timezone-series
            ghc-x11
            ghc-x11-xft
            ghc-cairo
@@ -914,18 +915,44 @@ (define-public xmobar
            libxpm))
     (arguments
      `(#:configure-flags (list "--flags=all_extensions")
-       ;; Haddock documentation is for the library.
-       #:haddock? #f
        #:phases
        (modify-phases %standard-phases
-         (add-after 'register 'remove-libraries
+         (add-after 'install 'remove-binaries
              (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
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "test/Xmobar/Plugins/Monitors/AlsaSpec.hs"
                (("/bin/bash") (which "bash"))))))))
     (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
+    (name "xmobar")
+    (version "0.46")
+    (source (origin
+              (method url-fetch)
+              (uri (hackage-uri "xmobar" version))
+              (sha256
+               (base32
+                "0glpiq7c0qwfcxnc2flgzj7afm5m1a9ghzwwcq7f8q27m21kddrd"))))
+    (build-system haskell-build-system)
+    (properties '((upstream-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))
+    (home-page "https://xmobar.org")
     (synopsis "Minimalistic text based status bar")
     (description
      "@code{xmobar} is a lightweight, text-based, status bar written in

base-commit: 961ffca1c75141cbb351d143b22b673638e9659d
-- 
2.40.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-07-07  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30  7:54 [bug#63799] [PATCH] gnu: xmobar: Keep xmobar libraries Saku Laesvuori via Guix-patches via
2023-07-01 14:36 ` Ludovic Courtès
2023-07-01 16:39   ` Lars-Dominik Braun
2023-07-02 16:24     ` Saku Laesvuori via Guix-patches via
2023-07-03  8:25       ` Lars-Dominik Braun via
2023-07-07  9:42         ` Saku Laesvuori via Guix-patches via [this message]
2023-07-07 12:19           ` bug#63799: [PATCH v2] gnu: Add ghc-xmobar Lars-Dominik Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230707094204.ipay3bqnksyx3eci@X-kone \
    --to=guix-patches@gnu.org \
    --cc=63799@debbugs.gnu.org \
    --cc=lars@6xq.net \
    --cc=ludo@gnu.org \
    --cc=saku@laesvuori.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.