Subject: [PATCH v3 2/4] gnu: Add ghc-twain.

From: pinoaffe <[email-masked]>
Date: Mon, 25 Sep 2023 22:21:32 +0200

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

diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 75b84b10a7..95f2669586 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2020 Alexandru-Sergiu Marton <[email-masked]>
 ;;; Copyright © 2020 Giacomo Leidi <[email-masked]>
 ;;; Copyright © 2022 Alice Brenon <[email-masked]>
+;;; Copyright © 2023 pinoaffe <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -483,6 +484,35 @@ (define-public ghc-wai
 communication between web applications and web servers.")
     (license license:bsd-3)))
 
+(define-public ghc-twain
+  (package
+    (name "ghc-twain")
+    (version "2.1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (hackage-uri "twain" version))
+              (sha256
+               (base32
+                "1hkzp2g671dagmv1qznkf3mw3l2mslckg7h0a8x8633h6i3j6br0"))))
+    (build-system haskell-build-system)
+    (properties '((upstream-name . "twain")))
+    (inputs (list ghc-aeson
+                  ghc-case-insensitive
+                  ghc-cookie
+                  ghc-either
+                  ghc-http-types
+                  ghc-http2
+                  ghc-vault
+                  ghc-wai
+                  ghc-wai-extra))
+    (native-inputs (list ghc-hspec ghc-hspec-discover ghc-hspec-wai))
+    (home-page "https://github.com/alexmingoia/twain#readme")
+    (synopsis "Tiny web application framework for WAI")
+    (description
+     "Twain is tiny web application framework for WAI.  It provides routing,
+parameter parsing, and an either-like monad for composing responses.")
+    (license license:bsd-3)))
+
 (define-public ghc-wai-logger
   (package
     (name "ghc-wai-logger")
-- 
2.41.0