Subject: gnu: Add matterhorn.

From: [email-masked]
Date: Sun, 08 Nov 2020 21:53:24 +0900

Hey Guix,

This packages up a nice CLI client for Mattermost chat servers (a self-hosted,
libre Slack alternative).

Anyway, it's a Haskell package and ended up requiring quite a few
dependendencies along with a few version-updated alternatives to existing
packages.

The attached patch bundles all these up together, but what is the appropriate
convention in this case?

The bulk of the work is completely thanks to the hackage importer, but I did
spend quite a bit of time cleaning these up and sanity checking things.
Everything should pass the lint checks as well as indentation.

Also, for two packages, I had to disable tests. There are comments explaining
why in each case.

Let me know what you think!

From 7d98b12981f75a2d2433a8b5f67031bdd435b89f Mon Sep 17 00:00:00 2001
From: "B. Wilson" <[email-masked]>
Date: Sun, 8 Nov 2020 20:44:37 +0900
Subject: [PATCH] gnu: Add matterhorn.
To: [email-masked]

* gnu/packages/messaging.scm (matterhorn): New variable.
* gnu/packages/haskell-web.scm (ghc-http-3.15, ghc-http-media): New variables.
* gnu/packages/haskell-check.scm (ghc-checkers)
(ghc-mattermost-api-qc, ghc-test-framework-smallcheck)
(ghc-quickcheck-assertions): New variables.
* gnu/packages/haskell-xyz.scm (ghc-ansi-terminal-0.11)
(ghc-timezone-olson-0.2, ghc-unique, ghc-stm-delay, ghc-aspell-pipe)
(ghc-hclip, ghc-brick-skylighting, ghc-word-wrap, ghc-text-zipper)
(ghc-vty, ghc-brick, ghc-ini, ghc-config-ini, ghc-data-clist)
(ghc-modern-uri, ghc-mattermost-api): New variables.
---
 gnu/packages/haskell-check.scm |  99 ++++++++
 gnu/packages/haskell-web.scm   |  48 ++++
 gnu/packages/haskell-xyz.scm   | 431 +++++++++++++++++++++++++++++++++
 gnu/packages/messaging.scm     |  67 +++++
 4 files changed, 645 insertions(+)

diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm
index b5546f97f8..023cdbc390 100644
--- a/gnu/packages/haskell-check.scm
+++ b/gnu/packages/haskell-check.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018 Arun Isaac <[email-masked]>
 ;;; Copyright © 2019 Timothy Sample <[email-masked]>
 ;;; Copyright © 2020 John Soo <[email-masked]>
+;;; Copyright © 2020 B. Wilson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1038,3 +1039,101 @@ regular development cycle and regressions caught early.
 See the documentation in \"Test.Inspection\" or the project webpage for more
 examples and more information.")
     (license license:expat)))
+
+(define-public ghc-mattermost-api-qc
+  (package
+    (name "ghc-mattermost-api-qc")
+    (version "50200.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/mattermost-api-qc/"
+             "mattermost-api-qc-" version ".tar.gz"))
+       (sha256
+        (base32 "0rcbsf5hrp2fd9jqmcr07gg2y0xg4ksasrqfxrc7n4mgw0a409i6"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-mattermost-api" ,ghc-mattermost-api)
+       ("ghc-quickcheck" ,ghc-quickcheck)))
+    (home-page "https://github.com/matterhorn-chat/mattermost-api-qc")
+    (synopsis "QuickCheck instances for the Mattermost client API library")
+    (description
+     "A library providing QuickCheck for the mattermost-api library to allow
+testing.  This is provided as a separate library to allow use of the API
+library without testing dependencies.")
+    (license license:isc)))
+
+(define-public ghc-checkers
+  (package
+    (name "ghc-checkers")
+    (version "0.5.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/checkers/checkers-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "1b82dz295h37pi6bnkr4r18gkvavrwvsig15955i8hh1rcn2msaz"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-random" ,ghc-random)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-semigroupoids" ,ghc-semigroupoids)))
+    (home-page "https://github.com/haskell-checkers/checkers")
+    (synopsis "Check properties on standard classes and data structures")
+    (description
+     "@code{Checkers} wraps up the expected properties associated with various
+standard type classes as QuickCheck properties.  Also some morphism properties.
+It also provides arbitrary instances and generator combinators for common data
+types.")
+    (license license:bsd-3)))
+
+(define-public ghc-test-framework-smallcheck
+  (package
+    (name "ghc-test-framework-smallcheck")
+    (version "0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/test-framework-smallcheck/"
+             "test-framework-smallcheck-" version ".tar.gz"))
+       (sha256
+        (base32 "1xpgpk1gp4w7w46b4rhj80fa0bcyz8asj2dcjb5x1c37b7rw90b0"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-smallcheck" ,ghc-smallcheck)))
+    (home-page "https://github.com/Bodigrim/smallcheck")
+    (synopsis "SmallCheck support for the test-framework package")
+    (description
+     "SmallCheck support for the test-framework package.  Support for
+SmallCheck tests in test-framework.")
+    (license license:bsd-3)))
+
+(define-public ghc-quickcheck-assertions
+  (package
+    (name "ghc-quickcheck-assertions")
+    (version "0.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/quickcheck-assertions/"
+             "quickcheck-assertions-" version ".tar.gz"))
+       (sha256
+        (base32 "1kyam4cy7qmnizjwjm8jamq43w7f0fs6ljfplwj0ib6wi2kjh0wv"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-ieee754" ,ghc-ieee754)
+       ("ghc-pretty-show" ,ghc-pretty-show)))
+    (native-inputs `(("ghc-hspec" ,ghc-hspec)))
+    (home-page "https://github.com/s9gf4ult/quickcheck-assertions")
+    (synopsis "HUnit like assertions for QuickCheck")
+    (description
+     "Library with convenient assertions for QuickCheck properties like in
+HUnit")
+    (license license:lgpl3)))
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index a4269599f6..a924aa65cd 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Alexandru-Sergiu Marton <[email-masked]>
 ;;; Copyright © 2020 Marius Bakke <[email-masked]>
 ;;; Copyright © 2020 Kyle Meyer <[email-masked]>
+;;; Copyright © 2020 B. Wilson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -223,6 +224,19 @@ lets you set up HTTP connections, transmitting requests and processing the
 responses coming back.")
     (license license:bsd-3)))
 
+(define-public ghc-http-3.15
+  (package
+    (inherit ghc-http)
+    (version "4000.3.15")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://hackage.haskell.org/package/HTTP/HTTP-"
+               version ".tar.gz"))
+        (sha256
+          (base32 "150m5v125s4jrxzl85jhnh69kp4mjyzhkqp0c1k087008f73csqd"))))))
+
 (define-public ghc-http-client
   (package
     (name "ghc-http-client")
@@ -1981,3 +1995,37 @@ Bower's package manifest file, bower.json.")
 Authoring and Versioning (WebDAV) extensions to HTTP as well an executable,
 @command{hdav}, for command-line operation.")
     (license license:gpl3)))
+
+(define-public ghc-http-media
+  (package
+    (name "ghc-http-media")
+    (version "0.8.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/http-media/http-media-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0lww5cxrc9jlvzsysjv99lca33i4rb7cll66p3c0rdpmvz8pk0ir"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-case-insensitive" ,ghc-case-insensitive)
+       ("ghc-utf8-string" ,ghc-utf8-string)))
+    (native-inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
+    (arguments
+     `(#:cabal-revision
+       ("3" "1ndz5x6njl35h73il5c6qpaqd4ynvg21n6k7sb8aq09gfbg544d8")))
+    (home-page "https://github.com/zmthy/http-media")
+    (synopsis "Processing HTTP Content-Type and Accept headers")
+    (description
+     "This library is intended to be a comprehensive solution to parsing and
+selecting quality-indexed values in HTTP headers.  It is capable of parsing
+both media types and language parameters from the Accept and Content header
+families, and can be extended to match against other accept headers as well.
+Selecting the appropriate header value is achieved by comparing a list of
+server options against the quality-indexed values supplied by the client.")
+    (license license:expat)))
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 19eabd949b..fcfa2d3940 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2020 Alexandru-Sergiu Marton <[email-masked]>
 ;;; Copyright © 2020 Carlo Holl <[email-masked]>
 ;;; Copyright © 2020 Christopher Lemmer Webber <[email-masked]>
+;;; Copyright © 2020 B. Wilson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -416,6 +417,20 @@ allows cursor movement, screen clearing, color output showing or hiding the
 cursor, and changing the title.")
     (license license:bsd-3)))
 
+(define-public ghc-ansi-terminal-0.11
+  (package
+    (inherit ghc-ansi-terminal)
+    (version "0.11")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://hackage.haskell.org/package/ansi-terminal/ansi-terminal-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32 "14rp62c7y79n9dmmi7m0l9n3mcq6dh331b4yyyrivm5da6g1nqf6"))))))
+
 (define-public ghc-ansi-wl-pprint
   (package
     (name "ghc-ansi-wl-pprint")
@@ -13766,6 +13781,20 @@ are provided for converting the parsed data into @code{TimeZoneSeries}
 objects from the timezone-series package.")
    (license license:bsd-3)))
 
+(define-public ghc-timezone-olson-0.2
+  (package
+    (inherit ghc-timezone-olson)
+    (version "0.2.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://hackage.haskell.org/package/timezone-olson/timezone-olson-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32 "0b9vh27b9nz803yhd93d5z63bs370lvn4vkdajxaak9clxlw6mwg"))))))
+
 (define-public ghc-tldr
   (package
     (name "ghc-tldr")
@@ -15469,3 +15498,405 @@ Zstandard compression algorithm, a fast lossless compression algorithm
 targeting real-time compression scenarios at zlib-level and better
 compression ratios.")
     (license license:bsd-3)))
+
+(define-public ghc-unique
+  (package
+    (name "ghc-unique")
+    (version "0.4.7.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/Unique/Unique-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0w82pa6r2a6969w251fbrx0sr1ws8mkg2lwdyjl4qjhl5s28k43i"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-extra" ,ghc-extra)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-quickcheck" ,ghc-quickcheck)))
+    (home-page "http://hackage.haskell.org/package/Unique")
+    (synopsis "It provides the functionality like unix \"uniq\" utility")
+    (description
+     "Library provides the functions to find unique and duplicate elements in
+the list")
+    (license license:bsd-3)))
+
+(define-public ghc-stm-delay
+  (package
+    (name "ghc-stm-delay")
+    (version "0.1.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/stm-delay/stm-delay-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0cla21v89gcvmr1iwzibq13v1yq02xg4h6k9l6kcprj7mhd5hcmi"))))
+    (build-system haskell-build-system)
+    (home-page "https://github.com/joeyadams/haskell-stm-delay")
+    (synopsis "Updatable one-shot timer polled with STM")
+    (description
+     "This library lets you create a one-shot timer, poll it using STM, and
+update it to ring at a different time than initially specified.  It uses GHC
+event manager timeouts when available (GHC 7.2+, @code{-threaded}, non-Windows
+OS), yielding performance similar to @code{threadDelay} and
+@code{registerDelay}.  Otherwise, it falls back to forked threads and
+@code{threadDelay}.")
+    (license license:bsd-3)))
+
+(define-public ghc-aspell-pipe
+  (package
+    (name "ghc-aspell-pipe")
+    (version "0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/aspell-pipe/aspell-pipe-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0vwav0xdrsb9kww7p1z63wifxd5bfd247vdqscf2amkdgm5k716m"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-async" ,ghc-async)))
+    (home-page "http://hackage.haskell.org/package/aspell-pipe")
+    (synopsis "Pipe-based interface to the Aspell program")
+    (description
+     "A pipe-based interface to the Aspell program (no dynamic linking
+required).")
+    (license license:bsd-3)))
+
+(define-public ghc-hclip
+  (package
+    (name "ghc-hclip")
+    (version "3.0.0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/Hclip/Hclip-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "04ppwm7vfzndrys8x1n8vfb41vzwx59r9xp4dkbiqmrms390pj6q"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-strict" ,ghc-strict)))
+    (home-page "https://github.com/jetho/Hclip")
+    (synopsis "Small cross-platform library for reading and modifying the
+system clipboard")
+    (description
+     "A small cross-platform library for reading and modifying the system
+clipboard.  Hclip works on Windows, Mac OS X and Linux (but see the
+requirements below!).
+
+Requirements:
+
+@itemize
+@item Windows: No additional requirements.
+@item Mac OS X: Requires the pbcopy and pbpaste commands, which ship with
+Mac OS X.
+@item Linux: Requires xclip or xsel installed.
+@end itemize")
+    (license license:bsd-3)))
+
+(define-public ghc-brick-skylighting
+  (package
+    (name "ghc-brick-skylighting")
+    (version "0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/brick-skylighting/"
+             "brick-skylighting-" version ".tar.gz"))
+       (sha256
+        (base32 "1wjl5ff9c7czg7azj2pi17b3kzbgb5rmwb4nkxdy86xn6d68adi1"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-brick" ,ghc-brick)
+       ("ghc-vty" ,ghc-vty)
+       ("ghc-skylighting-core" ,ghc-skylighting-core)))
+    (home-page "https://github.com/jtdaugherty/brick-skylighting/")
+    (synopsis "Show syntax-highlighted text in your Brick UI")
+    (description
+     "This package provides a module to use Skylighting to perform syntax
+highlighting and display the results in Brick-based interfaces.")
+    (license license:bsd-3)))
+
+(define-public ghc-word-wrap
+  (package
+    (name "ghc-word-wrap")
+    (version "0.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/word-wrap/word-wrap-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "15rcqhg9vb7qisk9ryjnyhhfgigxksnkrczycaw2rin08wczjwpb"))))
+    (build-system haskell-build-system)
+    (native-inputs `(("ghc-hspec" ,ghc-hspec)))
+    (arguments
+     `(#:cabal-revision
+       ("1" "1k4w4g053vhmpp08542hrqaw81p3p35i567xgdarqmpghfrk68pp")))
+    (home-page "https://github.com/jtdaugherty/word-wrap/")
+    (synopsis "Library for word-wrapping")
+    (description "A library for wrapping long lines of text.")
+    (license license:bsd-3)))
+
+(define-public ghc-text-zipper
+  (package
+    (name "ghc-text-zipper")
+    (version "0.10.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/text-zipper/text-zipper-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0jxicjp0ak1fyl1n3yspxq6hv9l90zzy75glsv8bc2svsn9ypyls"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-vector" ,ghc-vector)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("hspec-discover" ,hspec-discover)))
+    (home-page "https://github.com/jtdaugherty/text-zipper/")
+    (synopsis "Text editor zipper library")
+    (description "This library provides a zipper and API for editing text.")
+    (license license:bsd-3)))
+
+(define-public ghc-vty
+  (package
+    (name "ghc-vty")
+    (version "5.31")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/vty/vty-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0w71qnp1plqpib0b9c5kqyhybfmlw50hnlckw9jwr7m0mfssbqdb"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-blaze-builder" ,ghc-blaze-builder)
+       ("ghc-microlens" ,ghc-microlens)
+       ("ghc-microlens-mtl" ,ghc-microlens-mtl)
+       ("ghc-microlens-th" ,ghc-microlens-th)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-parallel" ,ghc-parallel)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-ansi-terminal" ,ghc-ansi-terminal-0.11)))
+    (native-inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-random" ,ghc-random)
+       ("ghc-smallcheck" ,ghc-smallcheck)
+       ("ghc-quickcheck-assertions" ,ghc-quickcheck-assertions)
+       ("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-test-framework-smallcheck" ,ghc-test-framework-smallcheck)
+       ("ghc-random" ,ghc-random)
+       ("ghc-hunit" ,ghc-hunit)
+       ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
+       ("ghc-string-qq" ,ghc-string-qq)))
+    (home-page "https://github.com/jtdaugherty/vty")
+    (synopsis "Simple terminal UI library")
+    (description
+     "Vty is terminal GUI library in the niche of ncurses.  It is intended to
+be easy to use, have no confusing corner cases, and good support for common
+terminal types.  See the @code{vty-examples} package as well as the program
+@code{test/interactive_terminal_test.hs} included in the @code{vty} package for
+examples on how to use the library.  Import the @code{Graphics.Vty} convenience
+module to get access to the core parts of the library.")
+    (license license:bsd-3)))
+
+(define-public ghc-brick
+  (package
+    (name "ghc-brick")
+    (version "0.57")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://hackage.haskell.org/package/brick/brick-"
+               version ".tar.gz"))
+        (sha256
+          (base32 "15481cmm208gxcs96rcvg6qgx87b2fk7ws82675viasw64mhvmg1"))))
+    (build-system haskell-build-system)
+    (inputs
+      `(("ghc-vty" ,ghc-vty)
+        ("ghc-data-clist" ,ghc-data-clist)
+        ("ghc-dlist" ,ghc-dlist)
+        ("ghc-exceptions" ,ghc-exceptions)
+        ("ghc-microlens" ,ghc-microlens)
+        ("ghc-microlens-th" ,ghc-microlens-th)
+        ("ghc-microlens-mtl" ,ghc-microlens-mtl)
+        ("ghc-config-ini" ,ghc-config-ini)
+        ("ghc-vector" ,ghc-vector)
+        ("ghc-contravariant" ,ghc-contravariant)
+        ("ghc-text-zipper" ,ghc-text-zipper)
+        ("ghc-word-wrap" ,ghc-word-wrap)
+        ("ghc-random" ,ghc-random)))
+    (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
+    (home-page "https://github.com/jtdaugherty/brick/")
+    (synopsis "Declarative terminal user interface library")
+    (description
+      "Write terminal user interfaces (TUIs) painlessly with @code{brick}! You
+write an event handler and a drawing function and the library does the rest.")
+    (license license:bsd-3)))
+
+(define-public ghc-ini
+  (package
+    (name "ghc-ini")
+    (version "0.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/ini/ini-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0mvwii8jbh2ll54qb9dij5m66c6324s2y4vrwz1qr4wz40m3qa8l"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-attoparsec" ,ghc-attoparsec)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)))
+    (native-inputs `(("ghc-hspec" ,ghc-hspec)))
+    (home-page "https://github.com/chrisdone/ini")
+    (synopsis "Quick and easy configuration files in the INI format")
+    (description "Quick and easy configuration files in the INI format.")
+    (license license:bsd-3)))
+
+(define-public ghc-config-ini
+  (package
+    (name "ghc-config-ini")
+    (version "0.2.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/config-ini/config-ini-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "0dfm4xb1sd713rcqzplzdgw68fyhj24i6lj8j3q8kldpmkl98lbf"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-megaparsec" ,ghc-megaparsec)))
+    (arguments
+     `(#:tests? #f ; Tests fail.  Upstream has fixed issue for next release.
+                   ; See https://github.com/aisamanra/config-ini/issues/22
+       #:cabal-revision
+       ("2" "0iwraaa0y1b3xdsg760j1wpylkqshky0k2djcg0k4s97lrwqpbcz")))
+    (home-page "https://github.com/aisamanra/config-ini")
+    (synopsis "Library for simple INI-based configuration files")
+    (description
+     "The @code{config-ini} library is a set of small monadic languages for
+writing simple configuration languages with convenient, human-readable error
+messages.")
+    (license license:bsd-3)))
+
+(define-public ghc-data-clist
+  (package
+    (name "ghc-data-clist")
+    (version "0.1.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/data-clist/data-clist-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "1mwfhnmvi3vicyjzl33m6pcipi2v887zazyqxygq258ndd010s9m"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
+    (arguments
+     `(#:cabal-revision
+       ("1" "13hg7a3d4ky8b765dl03ryxg28lq8iaqj5ky3j51r0i1i4f2a9hy")))
+    (home-page "https://github.com/sw17ch/data-clist")
+    (synopsis "Simple functional ring type")
+    (description
+     "Simple functional bidirectional ring type.  Given that the ring
+terminiology clashes with certain mathematical branches, we're using the term
+CList or CircularList instead.")
+    (license license:bsd-3)))
+
+(define-public ghc-modern-uri
+  (package
+    (name "ghc-modern-uri")
+    (version "0.3.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/modern-uri/modern-uri-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "184vhcnpwjsvxwbdsipz7kc2xylfwfqflbbbyipag610w07a3qk2"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-contravariant" ,ghc-contravariant)
+       ("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-megaparsec" ,ghc-megaparsec)
+       ("ghc-profunctors" ,ghc-profunctors)
+       ("ghc-reflection" ,ghc-reflection)
+       ("ghc-tagged" ,ghc-tagged)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-hspec-megaparsec" ,ghc-hspec-megaparsec)
+       ("hspec-discover" ,hspec-discover)))
+    (home-page "https://github.com/mrkkrp/modern-uri")
+    (synopsis "Modern library for working with URIs")
+    (description "Modern library for working with URIs.")
+    (license license:bsd-3)))
+
+(define-public ghc-mattermost-api
+  (package
+    (name "ghc-mattermost-api")
+    (version "50200.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/mattermost-api/mattermost-api-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "08whhlkr3ayimn66lwinvv0ci8zbhk5i7sz1fk5r1dp7mg2jzgig"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-websockets" ,ghc-websockets)
+       ("ghc-aeson" ,ghc-aeson)
+       ("ghc-connection" ,ghc-connection)
+       ("ghc-memory" ,ghc-memory)
+       ("ghc-resource-pool" ,ghc-resource-pool)
+       ("ghc-http" ,ghc-http-3.15)
+       ("ghc-http-media" ,ghc-http-media)
+       ("ghc-network-uri" ,ghc-network-uri)
+       ("ghc-modern-uri" ,ghc-modern-uri)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-gitrev" ,ghc-gitrev)
+       ("ghc-microlens" ,ghc-microlens)
+       ("ghc-microlens-th" ,ghc-microlens-th)
+       ("ghc-pretty-show" ,ghc-pretty-show)
+       ("ghc-split" ,ghc-split)))
+    ;; Tests require a local mattermost instance
+    (arguments `(#:tests? #f))
+    (home-page "http://hackage.haskell.org/package/mattermost-api")
+    (synopsis "Client API for Mattermost chat system")
+    (description
+     "Client API for Mattermost chat system.  Mattermost is a flexible, open
+source messaging platform that meets even the most demanding privacy and
+security standards.  This library provides network API interaction with the
+Mattermost server.")
+    (license license:bsd-3)))
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 7fe58094c0..f3dd535dbc 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2020 Mason Hock <[email-masked]>
 ;;; Copyright © 2020 Michael Rohleder <[email-masked]>
 ;;; Copyright © 2020 Raghav Gururajan <[email-masked]>
+;;; Copyright © 2020 B. Wilson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -110,6 +111,9 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-check)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
@@ -118,6 +122,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system haskell)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix hg-download)
@@ -2444,4 +2449,66 @@ as phones, embedded computers or microcontrollers.")
     ;; Dual licensed.
     (license (list license:epl1.0 license:edl1.0))))
 
+(define-public matterhorn
+  (package
+    (name "matterhorn")
+    (version "50200.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/matterhorn/matterhorn-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0wvw3wbv2sii1bjc8nmwyb1k0hzixfkfvpkmlkwa2my564vvmgz8"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-mattermost-api" ,ghc-mattermost-api)
+       ("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-split" ,ghc-split)
+       ("ghc-data-clist" ,ghc-data-clist)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-connection" ,ghc-connection)
+       ("ghc-config-ini" ,ghc-config-ini)
+       ("ghc-microlens-platform" ,ghc-microlens-platform)
+       ("ghc-brick" ,ghc-brick)
+       ("ghc-brick-skylighting" ,ghc-brick-skylighting)
+       ("ghc-vty" ,ghc-vty)
+       ("ghc-word-wrap" ,ghc-word-wrap)
+       ("ghc-text-zipper" ,ghc-text-zipper)
+       ("ghc-xdg-basedir" ,ghc-xdg-basedir)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-strict" ,ghc-strict)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-cheapskate" ,ghc-cheapskate)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-temporary" ,ghc-temporary)
+       ("ghc-gitrev" ,ghc-gitrev)
+       ("ghc-hclip" ,ghc-hclip)
+       ("ghc-aspell-pipe" ,ghc-aspell-pipe)
+       ("ghc-stm-delay" ,ghc-stm-delay)
+       ("ghc-skylighting-core" ,ghc-skylighting-core)
+       ("ghc-timezone-olson" ,ghc-timezone-olson-0.2)
+       ("ghc-timezone-series" ,ghc-timezone-series)
+       ("ghc-aeson" ,ghc-aeson)
+       ("ghc-async" ,ghc-async)
+       ("ghc-uuid" ,ghc-uuid)
+       ("ghc-random" ,ghc-random)
+       ("ghc-network-uri" ,ghc-network-uri)))
+    (native-inputs
+     `(("ghc-unique" ,ghc-unique)
+       ("ghc-checkers" ,ghc-checkers)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-mattermost-api-qc" ,ghc-mattermost-api-qc)))
+    (home-page "http://hackage.haskell.org/package/matterhorn")
+    (synopsis "Terminal client for the Mattermost chat system")
+    (description
+     "This is a terminal client for the Mattermost chat system.  Please see
+the README for a list of features and information on getting started.")
+    (license license:bsd-3)))
+
 ;;; messaging.scm ends here
-- 
2.29.2