Subject: [bug#44954] [PATCH] Add hledger-web and dependencies.

From: paul <[email-masked]>
Date: Sun, 6 Dec 2020 17:14:37 +0100

Hi Tim,

On 12/6/20 6:31 AM, Timothy Sample wrote:
> I have the new patches all lined up and ready to go.  Just one more
> question.  There should be a line for you in the copyright header of
> each changed file.  I’m happy to add it, but I want to make sure it’s
> okay.  The Git author field of the commits has
>
>      Giacomo Leidi <[email-masked]>
>
> Shall I use that for the copyright headers?

yes, thank you. I'm not sure if it'll help but I'm attaching the patches 
with the copyright header properly added, so that you may reuse them 
if/where necessary.

Cheers,

Giacomo

From 56e3f0d068a3560b0927e040b17a3569b6caffd2 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Fri, 4 Dec 2020 19:27:30 +0100
Subject: [PATCH 1/9] gnu: ghc-yesod-core: Update to 1.6.17.2.

* gnu/packages/haskell-web.scm (ghc-yesod-core): Update to 1.6.17.2.
---
 gnu/packages/haskell-web.scm | 58 ++++++++++++++++++++++++++++++++++--
 1 file changed, 56 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 9a149187b6..7ffb366eab 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2020 Marius Bakke <[email-masked]>
 ;;; Copyright © 2020 Kyle Meyer <[email-masked]>
 ;;; Copyright © 2020 Alexandru-Sergiu Marton <[email-masked]>
+;;; Copyright © 2020 Giacomo Leidi <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1258,7 +1259,7 @@ avoid any issues with characters.")
 (define-public ghc-yesod-core
   (package
     (name "ghc-yesod-core")
-    (version "1.6.16.1")
+    (version "1.6.17.2")
     (source
      (origin
        (method url-fetch)
@@ -1267,7 +1268,7 @@ avoid any issues with characters.")
                            "yesod-core-" version ".tar.gz"))
        (sha256
         (base32
-         "0a0yv7wkwvb0n6iia532y9nzrirgnm09pjc8hpm0lx4ff609pgd2"))))
+         "0rcfksbxnwcpg5qh9vjkddv39q95mx4nxzgix51bbwa128hhzcwf"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-wai" ,ghc-wai)
               ("ghc-extra" ,ghc-extra)
@@ -2024,3 +2025,56 @@ 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-yesod-test
+  (package
+   (name "ghc-yesod-test")
+   (version "1.6.10")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/yesod-test/yesod-test-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+       "0vw6yg5b22a6flbl822z23k0l23as5mmxjcdnj2zgjjv5i713yfx"))))
+   (build-system haskell-build-system)
+   (inputs
+    `(("ghc-hunit" ,ghc-hunit)
+      ("ghc-aeson" ,ghc-aeson)
+      ("ghc-attoparsec" ,ghc-attoparsec)
+      ("ghc-blaze-builder" ,ghc-blaze-builder)
+      ("ghc-blaze-html" ,ghc-blaze-html)
+      ("ghc-case-insensitive" ,ghc-case-insensitive)
+      ("ghc-conduit" ,ghc-conduit)
+      ("ghc-cookie" ,ghc-cookie)
+      ("ghc-hspec-core" ,ghc-hspec-core)
+      ("ghc-html-conduit" ,ghc-html-conduit)
+      ("ghc-http-types" ,ghc-http-types)
+      ("ghc-network" ,ghc-network)
+      ("ghc-memory" ,ghc-memory)
+      ("ghc-pretty-show" ,ghc-pretty-show)
+      ("ghc-semigroups" ,ghc-semigroups)
+      ("ghc-wai" ,ghc-wai)
+      ("ghc-wai-extra" ,ghc-wai-extra)
+      ("ghc-xml-conduit" ,ghc-xml-conduit)
+      ("ghc-xml-types" ,ghc-xml-types)
+      ("ghc-yesod-core" ,ghc-yesod-core)))
+   (native-inputs
+    `(("ghc-hspec" ,ghc-hspec)
+      ("ghc-yesod-form" ,ghc-yesod-form)
+      ("ghc-unliftio" ,ghc-unliftio)
+      ("ghc-unliftio-core" ,ghc-unliftio-core)))
+   (home-page "http://www.yesodweb.com")
+   (synopsis
+    "Integration testing for WAI/Yesod Applications")
+   (description
+    "This package's main goal is to encourage integration
+and system testing of web applications by making everything
+easy to test.  Tests are like browser sessions that
+keep track of cookies and the last visited page.  You
+can perform assertions on the content of HTML responses
+using CSS selectors.")
+   (license license:expat)))
-- 
2.29.2

From 9fe55e8b96f5436acf230e422d91ce1764f2954f Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Fri, 4 Dec 2020 19:38:14 +0100
Subject: [PATCH 2/9] gnu: ghc-yesod-test: Update to 1.6.9.

* gnu/packages/haskell-web.scm (ghc-yesod-test): Update to 1.6.9.
---
 gnu/packages/haskell-web.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 7ffb366eab..c5fec7aaf1 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -2029,7 +2029,7 @@ Authoring and Versioning (WebDAV) extensions to HTTP as well an executable,
 (define-public ghc-yesod-test
   (package
    (name "ghc-yesod-test")
-   (version "1.6.10")
+   (version "1.6.9")
    (source
     (origin
      (method url-fetch)
@@ -2039,7 +2039,7 @@ Authoring and Versioning (WebDAV) extensions to HTTP as well an executable,
            ".tar.gz"))
      (sha256
       (base32
-       "0vw6yg5b22a6flbl822z23k0l23as5mmxjcdnj2zgjjv5i713yfx"))))
+       "0v25lqq7hgd5lggnyfd9kamkzd4126rd7vlhc131n253n4by4yak"))))
    (build-system haskell-build-system)
    (inputs
     `(("ghc-hunit" ,ghc-hunit)
-- 
2.29.2

From 5a3646d3f4e79d492bc6cae8c35be9e414cc3356 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Sun, 29 Nov 2020 20:28:16 +0100
Subject: [PATCH 3/9] gnu: Add ghc-wai-app-static.

* gnu/packages/haskell-web.scm (ghc-wai-app-static): New variable.
---
 gnu/packages/haskell-web.scm | 52 ++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index c5fec7aaf1..34f807df9d 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -2078,3 +2078,55 @@ keep track of cookies and the last visited page.  You
 can perform assertions on the content of HTML responses
 using CSS selectors.")
    (license license:expat)))
+
+(define-public ghc-wai-app-static
+  (package
+   (name "ghc-wai-app-static")
+   (version "3.1.7.1")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/"
+           "wai-app-static/wai-app-static-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+        "10k6jb450p89r6dgpnwh428gg0wfw2qbx9n126jkvbchcjr1f4v8"))))
+   (build-system haskell-build-system)
+   (inputs
+    `(("ghc-wai" ,ghc-wai)
+      ("ghc-http-types" ,ghc-http-types)
+      ("ghc-unix-compat" ,ghc-unix-compat)
+      ("ghc-old-locale" ,ghc-old-locale)
+      ("ghc-file-embed" ,ghc-file-embed)
+      ("ghc-cryptonite" ,ghc-cryptonite)
+      ("ghc-memory" ,ghc-memory)
+      ("ghc-http-date" ,ghc-http-date)
+      ("ghc-blaze-html" ,ghc-blaze-html)
+      ("ghc-blaze-markup" ,ghc-blaze-markup)
+      ("ghc-mime-types" ,ghc-mime-types)
+      ("ghc-unordered-containers"
+       ,ghc-unordered-containers)
+      ("ghc-zlib" ,ghc-zlib)
+      ("ghc-wai-extra" ,ghc-wai-extra)
+      ("ghc-optparse-applicative"
+       ,ghc-optparse-applicative)
+      ("ghc-warp" ,ghc-warp)))
+   (native-inputs
+    `(("ghc-hspec" ,ghc-hspec)
+      ("ghc-network" ,ghc-network)
+      ("ghc-temporary" ,ghc-temporary)
+      ("ghc-mockery" ,ghc-mockery)))
+   (arguments
+    `(#:cabal-revision
+      ("1"
+       "0bkmml30rzifvb7nxddj3pxczk0kniahra19mjn0qrkzy1n5752p")))
+   (home-page
+    "http://www.yesodweb.com/book/web-application-interface")
+   (synopsis "WAI application for static serving")
+   (description
+    "This package provides a WAI application for static serving
+provides some helper functions and datatypes for use outside of WAI.")
+   (license license:expat)))
-- 
2.29.2

From 5db2d40ff325c4fd70c057f7ce366b87b2f6db80 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Sun, 29 Nov 2020 20:36:26 +0100
Subject: [PATCH 4/9] gnu: Add ghc-cryptonite-conduit.

* gnu/packages/haskell-crypto.scm (ghc-cryptonite-conduit): New variable.
---
 gnu/packages/haskell-crypto.scm | 40 +++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/haskell-crypto.scm b/gnu/packages/haskell-crypto.scm
index c92dec9932..bba95e3374 100644
--- a/gnu/packages/haskell-crypto.scm
+++ b/gnu/packages/haskell-crypto.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Nikita <[email-masked]>
 ;;; Copyright © 2017 rsiddharth <[email-masked]>
 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <[email-masked]>
+;;; Copyright © 2020 Giacomo Leidi <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -838,3 +839,42 @@ implementation of SSL.")
     (description "This library contains io-streams routines for secure
 networking using OpenSSL (by way of HsOpenSSL).")
     (license license:bsd-3)))
+
+(define-public ghc-cryptonite-conduit
+  (package
+   (name "ghc-cryptonite-conduit")
+   (version "0.2.2")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/cryptonite-conduit/cryptonite-conduit-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+       "1bldcmda4xh52mw1wfrjljv8crhw3al7v7kv1j0vidvr7ymnjpbh"))))
+   (build-system haskell-build-system)
+   (inputs
+    `(("ghc-conduit" ,ghc-conduit)
+      ("ghc-conduit-extra" ,ghc-conduit-extra)
+      ("ghc-cryptonite" ,ghc-cryptonite)
+      ("ghc-exceptions" ,ghc-exceptions)
+      ("ghc-memory" ,ghc-memory)
+      ("ghc-resourcet" ,ghc-resourcet)))
+   (native-inputs
+    `(("ghc-conduit-combinators"
+       ,ghc-conduit-combinators)
+      ("ghc-tasty" ,ghc-tasty)
+      ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+      ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
+   (arguments
+    `(#:cabal-revision
+      ("1"
+       "1hh2nzfz4qpxgivfilgk4ll416lph8b2fdkzpzrmqfjglivydfmz")))
+   (home-page
+    "https://github.com/haskell-crypto/cryptonite-conduit")
+   (synopsis "Cryptonite bridge for conduit")
+   (description
+    "This package provides a conduit version for hash and hmac.")
+   (license license:bsd-3)))
-- 
2.29.2

From f3c9da95d2943fc1e5f11858d5ef52995135dc6e Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Fri, 4 Dec 2020 20:15:41 +0100
Subject: [PATCH 5/9] gnu: Add ghc-hjsmin.

* gnu/packages/haskell-web.scm (ghc-hjsmin): New variable.
---
 gnu/packages/haskell-web.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 34f807df9d..06d3c1d74b 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -2130,3 +2130,35 @@ using CSS selectors.")
     "This package provides a WAI application for static serving
 provides some helper functions and datatypes for use outside of WAI.")
    (license license:expat)))
+
+(define-public ghc-hjsmin
+  (package
+   (name "ghc-hjsmin")
+   (version "0.2.0.4")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/hjsmin/hjsmin-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+       "1r2p5rjdjr25j3w4s57q5hxw2c3ymw12x7ms18yvglnq2ivr9fc1"))))
+   (build-system haskell-build-system)
+   (arguments
+    `(#:tests? #f))                     ;there are none
+   (inputs
+    `(("ghc-language-javascript"
+       ,ghc-language-javascript)
+      ("ghc-optparse-applicative"
+       ,ghc-optparse-applicative)))
+   (native-inputs `(("ghc-extra" ,ghc-extra)))
+   (home-page "https://github.com/erikd/hjsmin")
+   (synopsis
+    "Haskell implementation of a javascript minifier")
+   (description
+    "This package reduces size of javascript files by stripping
+out extraneous whitespace and other syntactic elements, without
+changing the semantics.")
+   (license license:bsd-3)))
-- 
2.29.2

From 7716370d8ca50d2718850eb618f402667ee6a763 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Fri, 4 Dec 2020 20:15:42 +0100
Subject: [PATCH 6/9] gnu: Add ghc-yesod-static.

* gnu/packages/haskell-web.scm (ghc-yesod-static): New variable.
---
 gnu/packages/haskell-web.scm | 52 ++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 06d3c1d74b..5a1e401b1b 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -2162,3 +2162,55 @@ provides some helper functions and datatypes for use outside of WAI.")
 out extraneous whitespace and other syntactic elements, without
 changing the semantics.")
    (license license:bsd-3)))
+
+(define-public ghc-yesod-static
+  (package
+   (name "ghc-yesod-static")
+   (version "1.6.0.1")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/yesod-static/yesod-static-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+       "1jd0ryfr2vyrwasyvbqmc6j4ngv1lgz78w427f169l7gyl1firxb"))))
+   (build-system haskell-build-system)
+   (inputs
+    `(("ghc-async" ,ghc-async)
+      ("ghc-attoparsec" ,ghc-attoparsec)
+      ("ghc-base64-bytestring" ,ghc-base64-bytestring)
+      ("ghc-blaze-builder" ,ghc-blaze-builder)
+      ("ghc-conduit" ,ghc-conduit)
+      ("ghc-cryptonite" ,ghc-cryptonite)
+      ("ghc-cryptonite-conduit"
+       ,ghc-cryptonite-conduit)
+      ("ghc-css-text" ,ghc-css-text)
+      ("ghc-data-default" ,ghc-data-default)
+      ("ghc-file-embed" ,ghc-file-embed)
+      ("ghc-hashable" ,ghc-hashable)
+      ("ghc-hjsmin" ,ghc-hjsmin)
+      ("ghc-http-types" ,ghc-http-types)
+      ("ghc-memory" ,ghc-memory)
+      ("ghc-mime-types" ,ghc-mime-types)
+      ("ghc-unix-compat" ,ghc-unix-compat)
+      ("ghc-unordered-containers"
+       ,ghc-unordered-containers)
+      ("ghc-wai" ,ghc-wai)
+      ("ghc-wai-app-static" ,ghc-wai-app-static)
+      ("ghc-yesod-core" ,ghc-yesod-core)))
+   (native-inputs
+    `(("ghc-hspec" ,ghc-hspec)
+      ("ghc-yesod-test" ,ghc-yesod-test)
+      ("ghc-wai-extra" ,ghc-wai-extra)
+      ("ghc-hunit" ,ghc-hunit)
+      ("ghc-rio" ,ghc-rio)))
+   (home-page "http://www.yesodweb.com/")
+   (synopsis
+    "Static file serving subsite for Yesod")
+   (description
+    "This package provides static file serving
+subsite for Yesod Web Framework.")
+   (license license:expat)))
-- 
2.29.2

From fecbd87614eb8e137005d6594992a742610da12f Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Fri, 4 Dec 2020 20:15:43 +0100
Subject: [PATCH 7/9] gnu: Add ghc-wai-handler-launch.

* gnu/packages/haskell-web.scm (ghc-wai-handler-launch): New variable.
---
 gnu/packages/haskell-web.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 5a1e401b1b..518f3e8fee 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -2214,3 +2214,34 @@ changing the semantics.")
     "This package provides static file serving
 subsite for Yesod Web Framework.")
    (license license:expat)))
+
+(define-public ghc-wai-handler-launch
+  (package
+   (name "ghc-wai-handler-launch")
+   (version "3.0.3.1")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/wai-handler-launch/wai-handler-launch-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+       "1ifqgyc1ccig5angh5l1iq7vyms4lvi8wzvysg5dw82nml49n02m"))))
+   (build-system haskell-build-system)
+   (inputs
+    `(("ghc-wai" ,ghc-wai)
+      ("ghc-warp" ,ghc-warp)
+      ("ghc-http-types" ,ghc-http-types)
+      ("ghc-streaming-commons" ,ghc-streaming-commons)
+      ("ghc-async" ,ghc-async)))
+   (home-page
+    "http://hackage.haskell.org/package/wai-handler-launch")
+   (synopsis
+    "Launch a web app in the default browser")
+   (description
+    "This package  handles cross-platform launching and inserts
+Javascript code to ping the server.  When the server no longer
+receives pings, it shuts down.")
+   (license license:expat)))
-- 
2.29.2

From 6207963c1d87995a8dc776c13881649b18085879 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Sun, 29 Nov 2020 22:59:29 +0100
Subject: [PATCH 8/9] gnu: Add ghc-wai-cors.

* gnu/packages/haskell-web.scm (ghc-wai-cors): New variable.
---
 gnu/packages/haskell-web.scm | 44 ++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 518f3e8fee..5d5764cd17 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -2245,3 +2245,47 @@ subsite for Yesod Web Framework.")
 Javascript code to ping the server.  When the server no longer
 receives pings, it shuts down.")
    (license license:expat)))
+
+(define-public ghc-wai-cors
+  (package
+   (name "ghc-wai-cors")
+   (version "0.2.7")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://hackage.haskell.org/package/wai-cors/wai-cors-"
+           version
+           ".tar.gz"))
+     (sha256
+      (base32
+       "10gv3jjlkcb13031frr818p56v2s0qf6dqjsfpwlhwdxdssvx5r5"))))
+   (build-system haskell-build-system)
+   (arguments
+    `(#:tests? #f))                     ;tests require PhantomJS
+   (inputs
+    `(("ghc-attoparsec" ,ghc-attoparsec)
+      ("ghc-base-unicode-symbols"
+       ,ghc-base-unicode-symbols)
+      ("ghc-case-insensitive" ,ghc-case-insensitive)
+      ("ghc-http-types" ,ghc-http-types)
+      ("ghc-wai" ,ghc-wai)))
+   (native-inputs
+    `(("ghc-network" ,ghc-network)
+      ("ghc-wai-websockets" ,ghc-wai-websockets)
+      ("ghc-warp" ,ghc-warp)
+      ("ghc-websockets" ,ghc-websockets)
+      ("ghc-tasty" ,ghc-tasty)
+      ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+      ("ghc-wai-extra" ,ghc-wai-extra)
+      ("ghc-wai-websockets" ,ghc-wai-websockets)
+      ("ghc-warp" ,ghc-warp)
+      ("ghc-websockets" ,ghc-websockets)))
+   (home-page
+    "https://github.com/larskuhtz/wai-cors")
+   (synopsis "CORS for WAI")
+   (description
+    "This package provides an implemenation of Cross-Origin
+resource sharing (CORS) for Wai that aims to be compliant with
+@url{http://www.w3.org/TR/cors}.")
+   (license license:expat)))
-- 
2.29.2

From 112628c497db41d293b8b168d8be9e642b6b1ed7 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Fri, 4 Dec 2020 20:15:45 +0100
Subject: [PATCH 9/9] gnu: Add hledger-web.

* gnu/packages/finance.scm (hledger-web): New variable.
---
 gnu/packages/finance.scm | 57 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index a79c70d1e0..ac2e2adfad 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2020 Marius Bakke <[email-masked]>
 ;;; Copyright © 2020 Vinicius Monego <[email-masked]>
 ;;; Copyright © 2020 Carlo Holl <[email-masked]>
+;;; Copyright © 2020 Giacomo Leidi <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1648,3 +1649,59 @@ generate a variety of reports from them, and provides a web interface.")
     (synopsis "Emacs mode for beancount")
     (description
       "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")))
+
+(define-public hledger-web
+  (package
+    (name "hledger-web")
+    (version "1.14.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/hledger-web/hledger-web-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0w59nr7mj0nx8z44cvhy1rhlj5rmx0wq4p5nfl4dycfmp7jwvsm1"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-decimal" ,ghc-decimal)
+       ("ghc-aeson" ,ghc-aeson)
+       ("ghc-blaze-html" ,ghc-blaze-html)
+       ("ghc-blaze-markup" ,ghc-blaze-markup)
+       ("ghc-case-insensitive" ,ghc-case-insensitive)
+       ("ghc-clientsession" ,ghc-clientsession)
+       ("ghc-cmdargs" ,ghc-cmdargs)
+       ("ghc-conduit" ,ghc-conduit)
+       ("ghc-conduit-extra" ,ghc-conduit-extra)
+       ("ghc-data-default" ,ghc-data-default)
+       ("ghc-hjsmin" ,ghc-hjsmin)
+       ("hledger" ,hledger)
+       ("ghc-hledger-lib" ,ghc-hledger-lib)
+       ("ghc-http-client" ,ghc-http-client)
+       ("ghc-http-conduit" ,ghc-http-conduit)
+       ("ghc-http-types" ,ghc-http-types)
+       ("ghc-json" ,ghc-json)
+       ("ghc-megaparsec" ,ghc-megaparsec)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-shakespeare" ,ghc-shakespeare)
+       ("ghc-wai" ,ghc-wai)
+       ("ghc-wai-extra" ,ghc-wai-extra)
+       ("ghc-wai-handler-launch"
+        ,ghc-wai-handler-launch)
+       ("ghc-warp" ,ghc-warp)
+       ("ghc-yaml" ,ghc-yaml)
+       ("ghc-yesod" ,ghc-yesod)
+       ("ghc-yesod-core" ,ghc-yesod-core)
+       ("ghc-yesod-form" ,ghc-yesod-form)
+       ("ghc-yesod-static" ,ghc-yesod-static)))
+    (home-page "https://hledger.org")
+    (synopsis
+     "Web-based user interface for the hledger accounting system")
+    (description
+     "This package provides a simple web-based user interface for
+the hledger accounting system, providing a more modern UI than
+the command-line or terminal interfaces.  It can be used as a local
+single-user UI, or as a multi-user UI for viewing/adding/editing on the web.")
+    (license license:gpl3)))
-- 
2.29.2