diff mbox series

[bug#63799] gnu: xmobar: Keep xmobar libraries

Message ID 20230530075453.30789-1-saku@laesvuori.fi
State New
Headers show
Series [bug#63799] gnu: xmobar: Keep xmobar libraries | expand

Commit Message

Saku Laesvuori May 30, 2023, 7:54 a.m. UTC
* 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(-)


base-commit: 3807876af4b53babdbc2f1d730e4763ff651f316

Comments

Ludovic Courtès July 1, 2023, 2:36 p.m. UTC | #1
Hi,

Saku Laesvuori <saku@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’.
Lars-Dominik Braun July 1, 2023, 4:39 p.m. UTC | #2
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
Saku Laesvuori July 2, 2023, 4:24 p.m. UTC | #3
>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.
Lars-Dominik Braun July 3, 2023, 8:25 a.m. UTC | #4
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
diff mbox series

Patch

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"