summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorKonstantin Suntsov <protvin@disroot.org>2026-07-23 00:34:32 +0500
committerAndreas Enge <andreas@enge.fr>2026-08-03 15:16:30 +0200
commit19ce0448f25343ca7fe96f8bc172d5e550f252f1 (patch)
tree406aa767af5db2eeb85f5bc9d55e7b3d08b3ba53 /gnu
parent3a8f087110e0f98642a61e6fe5e35dfe799369a9 (diff)
gnu: ghc-mattermost-api: Update to 90000.1.1.
* gnu/packages/haskell-web.scm (ghc-mattermost-api): Update to 90000.1.1. [source]: Add reference to patch. [inputs]: Drop ghc-connection. * gnu/packages/patches/ghc-matterhorn-crypton-connection.patch: New file. * gnu/local.mk (dist_patch_DATA): Add reference to it. Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/haskell-web.scm9
-rw-r--r--gnu/packages/patches/ghc-matterhorn-crypton-connection.patch60
3 files changed, 66 insertions, 4 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 64c215fc31d..bcb4f93fe3f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1460,6 +1460,7 @@ dist_patch_DATA = \
1460 %D%/packages/patches/ghc-memory-fix-32bit.patch \ 1460 %D%/packages/patches/ghc-memory-fix-32bit.patch \
1461 %D%/packages/patches/ghc-persistent-fix-32bit.patch \ 1461 %D%/packages/patches/ghc-persistent-fix-32bit.patch \
1462 %D%/packages/patches/ghc-openssl-streams-regenerate-test-certificate.patch \ 1462 %D%/packages/patches/ghc-openssl-streams-regenerate-test-certificate.patch \
1463 %D%/packages/patches/ghc-matterhorn-crypton-connection.patch \
1463 %D%/packages/patches/ghostscript-CVE-2023-36664.patch \ 1464 %D%/packages/patches/ghostscript-CVE-2023-36664.patch \
1464 %D%/packages/patches/ghostscript-CVE-2023-36664-fixup.patch \ 1465 %D%/packages/patches/ghostscript-CVE-2023-36664-fixup.patch \
1465 %D%/packages/patches/ghostscript-leptonica-hurd.patch \ 1466 %D%/packages/patches/ghostscript-leptonica-hurd.patch \
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index dd501f93629..3227a1e784a 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -14,6 +14,7 @@
14;;; Copyright © 2020 Giacomo Leidi <therewasa@fishinthecalculator.me> 14;;; Copyright © 2020 Giacomo Leidi <therewasa@fishinthecalculator.me>
15;;; Copyright © 2022 Alice Brenon <alice.brenon@ens-lyon.fr> 15;;; Copyright © 2022 Alice Brenon <alice.brenon@ens-lyon.fr>
16;;; Copyright © 2026 Maxim Cournoyer <maxim@guixotic.coop> 16;;; Copyright © 2026 Maxim Cournoyer <maxim@guixotic.coop>
17;;; Copyright © 2026 Konstantin Suntsov <protvin@disroot.org>
17;;; 18;;;
18;;; This file is part of GNU Guix. 19;;; This file is part of GNU Guix.
19;;; 20;;;
@@ -845,13 +846,14 @@ Haskell.")
845(define-public ghc-mattermost-api 846(define-public ghc-mattermost-api
846 (package 847 (package
847 (name "ghc-mattermost-api") 848 (name "ghc-mattermost-api")
848 (version "90000.0.0") 849 (version "90000.1.1")
849 (source 850 (source
850 (origin 851 (origin
851 (method url-fetch) 852 (method url-fetch)
852 (uri (hackage-uri "mattermost-api" version)) 853 (uri (hackage-uri "mattermost-api" version))
853 (sha256 854 (sha256
854 (base32 "1ka3r4bnfwlbjnkws8vkg8i9gj8wzsyss137p7hxrx4sr75s6iyv")))) 855 (base32 "0l6nqrn3sdikpi1h2hrx0p7c51qvq89ibqd3z9dzzg1riz4rirfr"))
856 (patches (search-patches "ghc-matterhorn-crypton-connection.patch"))))
855 (build-system haskell-build-system) 857 (build-system haskell-build-system)
856 (properties '((upstream-name . "mattermost-api"))) 858 (properties '((upstream-name . "mattermost-api")))
857 (inputs (list ghc-websockets 859 (inputs (list ghc-websockets
@@ -869,8 +871,7 @@ Haskell.")
869 ghc-microlens 871 ghc-microlens
870 ghc-microlens-th 872 ghc-microlens-th
871 ghc-pretty-show 873 ghc-pretty-show
872 ghc-split 874 ghc-split))
873 ghc-connection))
874 (native-inputs (list ghc-tasty ghc-tasty-hunit ghc-hunit)) 875 (native-inputs (list ghc-tasty ghc-tasty-hunit ghc-hunit))
875 (arguments 876 (arguments
876 (list #:tests? #f)) ;tests require networking and Mattermost Docker image 877 (list #:tests? #f)) ;tests require networking and Mattermost Docker image
diff --git a/gnu/packages/patches/ghc-matterhorn-crypton-connection.patch b/gnu/packages/patches/ghc-matterhorn-crypton-connection.patch
new file mode 100644
index 00000000000..5ae4d85c4d5
--- /dev/null
+++ b/gnu/packages/patches/ghc-matterhorn-crypton-connection.patch
@@ -0,0 +1,60 @@
1https://github.com/matterhorn-chat/mattermost-api/pull/65.patch
2
3From 2eb3aba58baeed5208a83deeb885a7ed100562ac Mon Sep 17 00:00:00 2001
4From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?=
5 <geoffrey@frogeye.fr>
6Date: Sun, 30 Nov 2025 10:02:49 +0100
7Subject: [PATCH] Support crypton-connection >= 0.4.0
8
9crypton-connection added a non-optional argument to TLSSettingSimple in
100.4.0: https://github.com/kazu-yamamoto/crypton-connection/pull/3 .
11
12This adds this argument, and limit crypton-connection to < 0.5.0 as they
13consider minor versions as breaking.
14---
15 mattermost-api.cabal | 3 ++-
16 src/Network/Mattermost/Util.hs | 3 ++-
17 2 files changed, 4 insertions(+), 2 deletions(-)
18
19diff --git a/mattermost-api.cabal b/mattermost-api.cabal
20index 08b6884..028f052 100644
21--- a/mattermost-api.cabal
22+++ b/mattermost-api.cabal
23@@ -45,7 +45,7 @@ library
24 , websockets >= 0.11.0.0
25 , stm
26 , aeson >= 2.0.1.0 && < 2.3.0.0
27- , crypton-connection
28+ , crypton-connection >= 0.4.0 && < 0.5.0
29 , memory
30 , resource-pool >= 0.2.3
31 -- To prevent broken websockets versions from using
32@@ -69,6 +69,7 @@ library
33 , template-haskell
34 , microlens
35 , microlens-th
36+ , tls
37 -- Only here to make debugging easier
38 , pretty-show
39 , split
40diff --git a/src/Network/Mattermost/Util.hs b/src/Network/Mattermost/Util.hs
41index 0a5b070..aba2f8f 100644
42--- a/src/Network/Mattermost/Util.hs
43+++ b/src/Network/Mattermost/Util.hs
44@@ -23,6 +23,7 @@ import Data.Monoid ((<>))
45 import Control.Exception ( Exception
46 , throwIO )
47 import Data.Pool (takeResource, putResource, destroyResource)
48+import Network.TLS (defaultSupported)
49 import Network.Connection ( Connection
50 , ConnectionContext
51 , ConnectionParams(..)
52@@ -95,7 +96,7 @@ mkConnection ctx host port connTy = do
53 -- The first argument to TLSSettingsSimple is whether to
54 -- /disable/ cert validation. If requireTrustedCert is True,
55 -- we want that argument to be False to force validation.
56- Just (TLSSettingsSimple (not requireTrustedCert) False False)
57+ Just (TLSSettingsSimple (not requireTrustedCert) False False defaultSupported)
58 , connectionUseSocks = do
59 (ty, cHost, cPort) <- proxy
60 case ty of