unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#63799] [PATCH] gnu: xmobar: Keep xmobar libraries
@ 2023-05-30  7:54 Saku Laesvuori via Guix-patches via
  2023-07-01 14:36 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Saku Laesvuori via Guix-patches via @ 2023-05-30  7:54 UTC (permalink / raw)
  To: 63799; +Cc: Saku Laesvuori

* 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





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#63799] [PATCH] gnu: xmobar: Keep xmobar libraries
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2023-07-01 14:36 UTC (permalink / raw)
  To: Saku Laesvuori; +Cc: 63799, Lars-Dominik Braun

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#63799] [PATCH] gnu: xmobar: Keep xmobar libraries
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Lars-Dominik Braun @ 2023-07-01 16:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 63799, Saku Laesvuori

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#63799] [PATCH] gnu: xmobar: Keep xmobar libraries
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Saku Laesvuori via Guix-patches via @ 2023-07-02 16:24 UTC (permalink / raw)
  To: Lars-Dominik Braun


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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#63799] [PATCH] gnu: xmobar: Keep xmobar libraries
  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         ` [bug#63799] [PATCH v2] gnu: Add ghc-xmobar Saku Laesvuori via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: Lars-Dominik Braun via @ 2023-07-03  8:25 UTC (permalink / raw)
  To: Saku Laesvuori

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#63799] [PATCH v2] gnu: Add ghc-xmobar
  2023-07-03  8:25       ` Lars-Dominik Braun via
@ 2023-07-07  9:42         ` Saku Laesvuori via Guix-patches via
  2023-07-07 12:19           ` bug#63799: " Lars-Dominik Braun
  0 siblings, 1 reply; 7+ messages in thread
From: Saku Laesvuori via Guix-patches via @ 2023-07-07  9:42 UTC (permalink / raw)
  To: Lars-Dominik Braun; +Cc: 63799, Ludovic Courtès

[-- 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 --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#63799: [PATCH v2] gnu: Add ghc-xmobar
  2023-07-07  9:42         ` [bug#63799] [PATCH v2] gnu: Add ghc-xmobar Saku Laesvuori via Guix-patches via
@ 2023-07-07 12:19           ` Lars-Dominik Braun
  0 siblings, 0 replies; 7+ messages in thread
From: Lars-Dominik Braun @ 2023-07-07 12:19 UTC (permalink / raw)
  To: Saku Laesvuori; +Cc: Ludovic Courtès, 63799-done

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-07 12:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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         ` [bug#63799] [PATCH v2] gnu: Add ghc-xmobar Saku Laesvuori via Guix-patches via
2023-07-07 12:19           ` bug#63799: " Lars-Dominik Braun

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).