Hi Tim,

Xmobar builds properly with all the extensions but I haven't really given
it a spin.  I did have to add a few more packages, but I think they are
reasonable.

I think the update to ghc after 8.4 will fix a segfault that i have been
experiencing :).

Here are my patches, is this the place to put them?

- John
From 0000579f1152545ca873c2a38a9bd5ef5c48f394 Mon Sep 17 00:00:00 2001
From: John Soo <js...@asu.edu>
Date: Thu, 14 Nov 2019 01:10:01 -0800
Subject: [PATCH 2/5] gnu: Add ghc-timezone-series.

* gnu/packages/haskell-xyz.scm (ghc-timezone-series): Add it.
---
 gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 3f61800d00..c80d905c86 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11102,6 +11102,29 @@ timer manager.")
 used CPU time of monadic computation with an IO base.")
     (license license:bsd-3)))
 
+(define-public ghc-timezone-series
+  (package
+   (name "ghc-timezone-series")
+   (version "0.1.9")
+   (source
+    (origin
+     (method url-fetch)
+     (uri
+      (string-append
+       "mirror://hackage/package/timezone-series/timezone-series-"
+       version ".tar.gz"))
+     (sha256
+      (base32
+       "1blwgnyzqn917rgqkl4dncv9whv3xmk0lav040qq0214vksmvlz5"))))
+   (build-system haskell-build-system)
+   (home-page "http://projects.haskell.org/time-ng/";)
+   (synopsis "Enhanced timezone handling for Time")
+   (description
+    "This package endows @code{Data.Time}, from the time package, with several
+data types and functions for enhanced processing of timezones. For one way to
+create timezone series, see the ghc-timezone-olson package.")
+   (license license:bsd-3)))
+
 (define-public ghc-tldr
   (package
     (name "ghc-tldr")
-- 
2.24.0

From abb2062d2df2727584570091fd72331577dd3781 Mon Sep 17 00:00:00 2001
From: John Soo <js...@asu.edu>
Date: Thu, 14 Nov 2019 01:25:58 -0800
Subject: [PATCH 4/5] gnu: Add ghc-dbus.

* gnu/packages/haskell-xyz.scm (ghc-dbus): Add it.
---
 gnu/packages/haskell-xyz.scm | 51 ++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 28c2ffd183..5b8b785a81 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -2665,6 +2665,57 @@ It includes hashing functions for all basic Haskell98 types.")
      "This module provides set and multiset operations on ordered lists.")
     (license license:bsd-3)))
 
+(define-public ghc-dbus
+  (package
+    (name "ghc-dbus")
+    (version "1.2.7")
+    (source
+      (origin
+        (method url-fetch)
+        (uri
+         (string-append
+          "mirror://hackage/package/dbus/dbus-"
+          version ".tar.gz"))
+        (sha256
+          (base32
+            "0ypkjlw9fn65g7p28kb3p82glk7qs7p7vyffccw7qxa3z57s12w5"))))
+    (build-system haskell-build-system)
+    (inputs
+      `(("ghc-cereal" ,ghc-cereal)
+        ("ghc-conduit" ,ghc-conduit)
+        ("ghc-exceptions" ,ghc-exceptions)
+        ("ghc-lens" ,ghc-lens)
+        ("ghc-network" ,ghc-network)
+        ("ghc-random" ,ghc-random)
+        ("ghc-split" ,ghc-split)
+        ("ghc-th-lift" ,ghc-th-lift)
+        ("ghc-vector" ,ghc-vector)
+        ("ghc-xml-conduit" ,ghc-xml-conduit)
+        ("ghc-xml-types" ,ghc-xml-types)))
+    (native-inputs
+      `(("ghc-extra" ,ghc-extra)
+        ("ghc-quickcheck" ,ghc-quickcheck)
+        ("ghc-resourcet" ,ghc-resourcet)
+        ("ghc-tasty" ,ghc-tasty)
+        ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+        ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
+    ;; FIXME - Some tests try to talk to network.
+    (arguments `(#:tests? #f))
+    (home-page
+      "https://github.com/rblaze/haskell-dbus#readme";)
+    (synopsis
+      "A client library for the D-Bus IPC system")
+    (description
+      "D-Bus is a simple, message-based protocol for inter-process
+communication, which allows applications to interact with other parts
+of the machine and the user's session using remote procedure
+calls.  D-Bus is a essential part of the modern Linux desktop, where
+it replaces earlier protocols such as CORBA and DCOP. This library
+is an implementation of the D-Bus protocol in Haskell. It can be used
+to add D-Bus support to Haskell applications, without the awkward
+interfaces common to foreign bindings.")
+    (license license:asl2.0)))
+
 (define-public ghc-deepseq-generics
   (package
     (name "ghc-deepseq-generics")
-- 
2.24.0

From 436b2f7079fe12b71dace446dff0cc086f6b74a6 Mon Sep 17 00:00:00 2001
From: John Soo <js...@asu.edu>
Date: Wed, 13 Nov 2019 23:59:23 -0800
Subject: [PATCH 1/5] gnu: Add ghc-alsa-mixer.

* gnu/packages/haskell-xyz.scm (ghc-alsa-mixer): Add it.
---
 gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index e952ab46c0..3f61800d00 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -304,6 +304,29 @@ tool lex or flex for C/C++.")
 needed by both alsa-seq and alsa-pcm.")
     (license license:bsd-3)))
 
+(define-public ghc-alsa-mixer
+  (package
+   (name "ghc-alsa-mixer")
+   (version "0.3.0")
+   (source
+    (origin
+     (method url-fetch)
+     (uri
+      (string-append
+       "mirror://hackage/package/alsa-mixer/alsa-mixer-"
+       version ".tar.gz"))
+     (sha256
+      (base32
+       "00ny2p3276jilidjs44npc8zmbhynz3f2lpmlwwl6swwx5yijsnb"))))
+   (build-system haskell-build-system)
+   (inputs `(("ghc-alsa-core" ,ghc-alsa-core)))
+   (native-inputs `(("ghc-c2hs" ,ghc-c2hs)))
+   (home-page "https://github.com/ttuegel/alsa-mixer";)
+   (synopsis "Bindings to the ALSA simple mixer API")
+   (description
+    "This package provides bindings to the ALSA simple mixer API.")
+   (license license:bsd-3)))
+
 (define-public ghc-annotated-wl-pprint
   (package
     (name "ghc-annotated-wl-pprint")
-- 
2.24.0

From bee82f6e2d73f5381c96afe3a01fc012bdffb969 Mon Sep 17 00:00:00 2001
From: John Soo <js...@asu.edu>
Date: Thu, 14 Nov 2019 01:10:31 -0800
Subject: [PATCH 3/5] gnu: Add ghc-timezone-olson

* gnu/packages/haskell-xyz.scm (ghc-timezone-olson): Add it.
---
 gnu/packages/haskell-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index c80d905c86..28c2ffd183 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11125,6 +11125,35 @@ data types and functions for enhanced processing of timezones. For one way to
 create timezone series, see the ghc-timezone-olson package.")
    (license license:bsd-3)))
 
+(define-public ghc-timezone-olson
+  (package
+   (name "ghc-timezone-olson")
+   (version "0.1.9")
+   (source
+    (origin
+     (method url-fetch)
+     (uri
+      (string-append
+       "mirror://hackage/package/timezone-olson/timezone-olson-"
+       version ".tar.gz"))
+     (sha256
+      (base32
+       "05abywx1nrcaz0nqzfy4zw62bc5qd7pdfnjvv4drxkwv084ha8rj"))))
+   (build-system haskell-build-system)
+   (inputs
+    `(("ghc-timezone-series" ,ghc-timezone-series)
+      ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)))
+   (home-page "http://projects.haskell.org/time-ng/";)
+   (synopsis "Parser and renderer for binary Olson timezone files")
+   (description
+    "A parser and renderer for binary Olson timezone files whose format is
+specified by the tzfile(5) man page on Unix-like systems. For more information
+about this format, see
+http://www.iana.org/time-zones/repository/tz-link.html. Functions are provided
+for converting the parsed data into @code{TimeZoneSeries} objects from the
+timezone-series package.")
+   (license license:bsd-3)))
+
 (define-public ghc-tldr
   (package
     (name "ghc-tldr")
-- 
2.24.0

From a873fdb05d85704967c24fff125c79deea17daa5 Mon Sep 17 00:00:00 2001
From: John Soo <js...@asu.edu>
Date: Thu, 14 Nov 2019 01:32:38 -0800
Subject: [PATCH 5/5] gnu: Update xmobar to 0.31.

* gnu/packages/wm.scm (xmobar): Update to 0.31.
---
 gnu/packages/wm.scm | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index e793d89bfa..4d248fbcdd 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2019 Kyle Andrews <kyle.c.andr...@gmail.com>
 ;;; Copyright © 2019 Ingo Ruhnke <grum...@gmail.com>
 ;;; Copyright © 2019 Tanguy Le Carrour <tan...@bioneland.org>
+;;; Copyright © 2019 John Soo <js...@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -649,36 +650,46 @@ tiled on several screens.")
 (define-public xmobar
   (package
     (name "xmobar")
-    (version "0.28")
+    (version "0.31")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://hackage/package/xmobar/"
                                   "xmobar-" version ".tar.gz"))
               (sha256
                (base32
-                "1xh87asg8y35srvp7d3gyyy4bkxsw122liihxgzgm8pqv2z3h4zd"))))
+                "1sbxva4zaj060bigmxivpn4zlz0q1qbq2np8gljdqkjvysjzpbka"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-hspec" ,ghc-hspec)
        ("hspec-discover" ,hspec-discover)))
     (inputs
-     `(("ghc-hinotify" ,ghc-hinotify)
+     `(("ghc-alsa-core" ,ghc-alsa-core)
+       ("ghc-alsa-mixer" ,ghc-alsa-mixer)
+       ("ghc-dbus" ,ghc-dbus)
+       ("ghc-libmpd" ,ghc-libmpd)
+       ("ghc-hinotify" ,ghc-hinotify)
        ("ghc-http" ,ghc-http)
+       ("ghc-http-conduit" ,ghc-http-conduit)
+       ("ghc-http-types" ,ghc-http-types)
        ("ghc-iwlib" ,ghc-iwlib)
+       ("ghc-libmpd" ,ghc-libmpd)
+       ("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-x11" ,ghc-x11)
        ("ghc-x11-xft" ,ghc-x11-xft)
        ("libxpm" ,libxpm)))
     (arguments
-     `(#:configure-flags
-       (list (string-append "--flags="
-                            (string-join (list "with_inotify"
-                                               "with_iwlib"
-                                               "with_utf8"
-                                               "with_weather"
-                                               "with_xft"
-                                               "with_xpm")
-                                         " ")))))
+     `(#:configure-flags (list "--flags=all_extensions")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-test-shebang
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "test/Xmobar/Plugins/Monitors/AlsaSpec.hs"
+               (("/bin/bash") (which "bash")))
+             #t)))))
     (home-page "http://xmobar.org";)
     (synopsis "Minimalistic text based status bar")
     (description
-- 
2.24.0

Reply via email to