GNU bug report logs - #63799
[PATCH] gnu: xmobar: Keep xmobar libraries

Previous Next

Package: guix-patches;

Reported by: Saku Laesvuori <saku <at> laesvuori.fi>

Date: Tue, 30 May 2023 07:56:02 UTC

Severity: normal

Tags: patch

Done: Lars-Dominik Braun <lars <at> 6xq.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63799 in the body.
You can then email your comments to 63799 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63799; Package guix-patches. (Tue, 30 May 2023 07:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Saku Laesvuori <saku <at> laesvuori.fi>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 30 May 2023 07:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Saku Laesvuori <saku <at> laesvuori.fi>
To: guix-patches <at> gnu.org
Cc: Saku Laesvuori <saku <at> laesvuori.fi>
Subject: [PATCH] gnu: xmobar: Keep xmobar libraries
Date: Tue, 30 May 2023 10:54:53 +0300
* gnu/packages/wm.scm (xmobar)[arguments]: Remove 'remove-libraries
  phase and enable #:haddock?.
---
This patch effectively reverts 6188fe26334, which for some reason
dropped the libraries from the xmobar package. I can write a patch
adding the libraries in a separate package if that is preferred, but I
think xmobar should have it's configuration libraries included just like
xmonad has.

 gnu/packages/wm.scm | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index b4e0e51018..d347b12d6d 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -896,13 +896,8 @@ (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
-             (lambda* (#:key outputs #:allow-other-keys)
-               (delete-file-recursively (string-append (assoc-ref outputs "out") "/lib"))))
          (add-before 'build 'patch-test-shebang
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "test/Xmobar/Plugins/Monitors/AlsaSpec.hs"

base-commit: 3807876af4b53babdbc2f1d730e4763ff651f316
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#63799; Package guix-patches. (Sat, 01 Jul 2023 14:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 63799 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Saku Laesvuori <saku <at> laesvuori.fi>
Cc: 63799 <at> debbugs.gnu.org, Lars-Dominik Braun <lars <at> 6xq.net>
Subject: Re: bug#63799: [PATCH] gnu: xmobar: Keep xmobar libraries
Date: Sat, 01 Jul 2023 16:36:35 +0200
Hi,

Saku Laesvuori <saku <at> laesvuori.fi> skribis:

> * gnu/packages/wm.scm (xmobar)[arguments]: Remove 'remove-libraries
>   phase and enable #:haddock?.
> ---
> This patch effectively reverts 6188fe26334, which for some reason
> dropped the libraries from the xmobar package. I can write a patch
> adding the libraries in a separate package if that is preferred, but I
> think xmobar should have it's configuration libraries included just like
> xmonad has.

This change (removing libraries) was done as part of
<https://issues.guix.gnu.org/61420>.  Lars, WDYT of reinstating
libraries here?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#63799; Package guix-patches. (Sat, 01 Jul 2023 16:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 63799 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 63799 <at> debbugs.gnu.org, Saku Laesvuori <saku <at> laesvuori.fi>
Subject: Re: bug#63799: [PATCH] gnu: xmobar: Keep xmobar libraries
Date: Sat, 1 Jul 2023 18:39:05 +0200
Hi,

> This change (removing libraries) was done as part of
> <https://issues.guix.gnu.org/61420>.  Lars, WDYT of reinstating
> libraries here?

keeping the libraries in this package will make it depend on all of GHC
and all of its ghc-* dependencies. xmonad is a special case, because
“configuring” it will actually recompile the entire binary. As far
as I see this is not the case for xmobar. What do we need the libraries
for?

Cheers,
Lars





Information forwarded to guix-patches <at> gnu.org:
bug#63799; Package guix-patches. (Fri, 07 Jul 2023 09:23:01 GMT) Full text and rfc822 format available.

Message #14 received at 63799 <at> debbugs.gnu.org (full text, mbox):

From: Saku Laesvuori <saku <at> laesvuori.fi>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Subject: Re: bug#63799: [PATCH] gnu: xmobar: Keep xmobar libraries
Date: Sun, 02 Jul 2023 19:24:54 +0300
>xmonad is a special case, because “configuring” it will
>actually recompile the entire binary. As far as I see this
>is not the case for xmobar. What do we need the libraries
>for?

Xmobar can be configured in the same way as xmonad. It can also be used with a simple config file, but that provides less flexibility. I have written some extra haskell modules for my xmobar configuration and they obviously can't be used without recompiling.





Information forwarded to guix-patches <at> gnu.org:
bug#63799; Package guix-patches. (Fri, 07 Jul 2023 09:29:01 GMT) Full text and rfc822 format available.

Message #17 received at 63799 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Saku Laesvuori <saku <at> laesvuori.fi>
Subject: Re: bug#63799: [PATCH] gnu: xmobar: Keep xmobar libraries
Date: Mon, 3 Jul 2023 10:25:25 +0200
Hi,

> Xmobar can be configured in the same way as xmonad. It can also be used with a simple config file, but that provides less flexibility. I have written some extra haskell modules for my xmobar configuration and they obviously can't be used without recompiling.

I’m sorry, you’re right. I would add a second package, ghc-xmobar,
which includes only the libraries but not the binary then, since it’s
kind of optional for xmobar. Maybe you can even build xmobar using
ghc-xmobar? Do you want to prepare a patch?

Cheers,
Lars





Information forwarded to guix-patches <at> gnu.org:
bug#63799; Package guix-patches. (Fri, 07 Jul 2023 09:43:01 GMT) Full text and rfc822 format available.

Message #20 received at 63799 <at> debbugs.gnu.org (full text, mbox):

From: Saku Laesvuori <saku <at> laesvuori.fi>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 63799 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH v2] gnu: Add ghc-xmobar
Date: Fri, 7 Jul 2023 12:42:04 +0300
[Message part 1 (text/plain, inline)]
* 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

[signature.asc (application/pgp-signature, inline)]

Reply sent to Lars-Dominik Braun <lars <at> 6xq.net>:
You have taken responsibility. (Fri, 07 Jul 2023 12:20:01 GMT) Full text and rfc822 format available.

Notification sent to Saku Laesvuori <saku <at> laesvuori.fi>:
bug acknowledged by developer. (Fri, 07 Jul 2023 12:20:02 GMT) Full text and rfc822 format available.

Message #25 received at 63799-done <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Saku Laesvuori <saku <at> laesvuori.fi>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 63799-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add ghc-xmobar
Date: Fri, 7 Jul 2023 14:19:36 +0200
Hey,

> * 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.

pushed as ba1fe203b293469e8db1a78e5090ecc711aaaba2 with minor modifications (added inherit from ghc-xmobar).

Cheers,
Lars




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Aug 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.