From 08dd981d6a94b88847612b860b91b0b2478c21b5 Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Tue, 28 Feb 2023 16:47:19 +0100 Subject: [PATCH 1/3] Cleanup haskell-pins --- nix/haskell-pins.nix | 119 ++---------------- nix/manual-overrides.nix | 3 +- services/brig/brig.cabal | 1 - services/brig/default.nix | 2 - tools/db/inconsistencies/default.nix | 2 - .../db/inconsistencies/inconsistencies.cabal | 1 - 6 files changed, 14 insertions(+), 114 deletions(-) diff --git a/nix/haskell-pins.nix b/nix/haskell-pins.nix index 95d55d3fbad..1823e758639 100644 --- a/nix/haskell-pins.nix +++ b/nix/haskell-pins.nix @@ -64,40 +64,6 @@ let sha256 = "sha256-mWBZ2uY0shlxNRceyC2Zu1f3Kr4IDtT/rOL7CKWgilA="; }; }; - HaskellNet-SSL = { - src = fetchgit { - url = "https://github.com/dpwright/HaskellNet-SSL"; - rev = "ca84ef29a93eaef7673fa58056cdd8dae1568d2d"; - sha256 = "1w23xgjdq22px90p12yw30psagc668n7l183bqvf8x075s77wckr"; - }; - }; - prometheus-haskell = { - src = fetchgit { - url = "https://github.com/fimad/prometheus-haskell"; - rev = "2e3282e5fb27ba8d989c271a0a989823fad7ec43"; - sha256 = "0vfzysn9sgpxymfvpahxrp74fczgjnw3kgknj6zk0473qk85488f"; - }; - packages = { - wai-middleware-prometheus = "wai-middleware-prometheus"; - }; - }; - hs-collectd = { - src = fetchgit { - url = "https://github.com/kim/hs-collectd"; - rev = "885da222be2375f78c7be36127620ed772b677c9"; - sha256 = "1a3jwj0h2vzgjvzaa4jghmxkjwbzisq4qc7dldc42zi4jaq7lix7"; - }; - }; - hs-certificate = { - src = fetchgit { - url = "https://github.com/vincenthz/hs-certificate"; - rev = "a899bda3d7666d25143be7be8f3105fc076703d9"; - sha256 = "0ivc4l3c272i7w37rfgsbwnxa3fzfmghwddlqvzj5jj3zx5lyqlk"; - }; - packages = { - x509-store = "x509-store"; - }; - }; amazonka = { src = fetchgit { url = "https://github.com/brendanhay/amazonka"; @@ -131,13 +97,6 @@ let sha256 = "0dgizj1kc135yzzqdf5l7f5ax0qpvrr8mxvg7s1dbm01cf11aqzn"; }; }; - multihash = { - src = fetchgit { - url = "https://github.com/wireapp/haskell-multihash.git"; - rev = "300a6f46384bfca33e545c8bab52ef3717452d12"; - sha256 = "0lcm6argp49fin4va7c50l1lj84xcm3cqzijzssfdgplimpmllma"; - }; - }; hsaml2 = { src = fetchgit { url = "https://github.com/wireapp/hsaml2"; @@ -152,26 +111,6 @@ let sha256 = "sha256-6FLTMMqvL0xFa5zsMnjVAmdpghmdeBl813bWcOyQo5E="; }; }; - http-client = { - src = fetchgit { - url = "https://github.com/wireapp/http-client"; - rev = "9100baeddbd15d93dc58a826ae812dafff29d5fd"; - sha256 = "16n340bg5vdb169f6d6421hx13wyqdsb5b314r823v34r8p0b19z"; - }; - packages = { - http-client = "http-client"; - http-client-openssl = "http-client-openssl"; - http-client-tls = "http-client-tls"; - http-conduit = "http-conduit"; - }; - }; - http2 = { - src = fetchgit { - url = "https://github.com/wireapp/http2"; - rev = "aa3501ad58e1abbd196781fac25a84f41ec2a787"; - sha256 = "09h86fkk8p7szq08x0iszaq16mhbylxivfc0apvj58d98wl8l6lq"; - }; - }; saml2-web-sso = { src = fetchgit { url = "https://github.com/wireapp/saml2-web-sso"; @@ -181,11 +120,12 @@ let }; swagger2 = { src = fetchgit { - url = "https://github.com/wireapp/swagger2"; - rev = "ba916df2775bb38ec603b726bbebfb65a908317a"; - sha256 = "sha256-IcsrJ5ur8Zm7Xp1PQBOb+2N7T8WMI8jJ6YuDv8ypsPQ="; + url = "https://github.com/GetShopTV/swagger2"; + rev = "d79deca03b714cdd4531217831a8305068b2e8f9"; + sha256 = "sha256-R3p0L0TgM0Bspe5z6vauwdPq9TmEWpMC53DBkMtCEoE="; }; }; + # MR: https://gitlab.com/twittner/cql-io/-/merge_requests/20 cql-io = { src = fetchgit { url = "https://gitlab.com/wireapp/forks/cql-io"; @@ -207,6 +147,7 @@ let sha256 = "18icwks9jc6sy42vcvj2ysaip2s0dsrpvm9sy608b6nq6kk1ahlk"; }; }; + # PR: https://github.com/UnkindPartition/tasty/pull/351 tasty = { src = fetchgit { url = "https://github.com/wireapp/tasty"; @@ -241,59 +182,25 @@ let sha256 = "sha256-htEIJY+LmIMACVZrflU60+X42/g14NxUyFM7VJs4E6w="; }; }; - # PR: https://github.com/haskell-cryptography/HsOpenSSL/pull/76 - HsOpenSSL = { - src = fetchgit { - url = "https://github.com/wireapp/HsOpenSSL"; - rev = "b36c063d44b8b8732f0e6334ad58d2235fedd92e"; - sha256 = "sha256-NdWzTqWDQvCwyp3la3RGN9D1lGaLHHrxQuFxpk9R+lQ="; - }; - }; }; hackagePins = { + # Major re-write upstream, we should get rid of this dependency rather than + # adapt to upstream. wai-route = { version = "0.4.0"; sha256 = "sha256-DSMckKIeVE/buSMg8Mq+mUm1bYPYB7veA11Ns7vTBbc="; }; - kind-generics = { - version = "0.4.1.4"; - sha256 = "sha256-vH4YO/2NtaLDn1pyAQYK9vC5dD0bpdk26aH5sA9+UT8="; - }; - kind-generics-th = { - version = "0.2.2.3"; - sha256 = "sha256-LH2Wpo0v+RQSsvVbosuB99ekSzqsqMNjrd+w/B0SOUs="; - }; polysemy = { version = "1.8.0.0"; sha256 = "sha256-AdxxKWXdUjZiHLDj6iswMWpycs7mFB8eKhBR4ljF6kk="; }; - polysemy-check = { - version = "0.9.0.1"; - sha256 = "sha256-CsL2vMxAmpvVVR/iUnZAkbcRLiy/a8ulJQ6QwtCYmRM="; - }; - polysemy-plugin = { - version = "0.4.3.1"; - sha256 = "sha256-0vkLYNZISr3fmmQvD8qdLkn2GHc80l1GzJuOmqjqXE4="; - }; - one-liner = { - version = "1.0"; - sha256 = "sha256-dv/W8hIPoHVevxiiCb6OfeP53O/9HPgUiqOHGSNb/pk="; - }; - singletons = { - version = "3.0.1"; - sha256 = "sha256-ixHWZae6AxjRUldMgpYolXBGsOUT5ZVIw9HZkxrhHQ0="; - }; - singletons-base = { - version = "3.1"; - sha256 = "sha256-SjpkQofdDMrUMi9cHNF5eyqic7WMAhWNqrKr4ip1RNs="; - }; - singletons-th = { - version = "3.1"; - sha256 = "sha256-34nyestxt8KNTSlmr1Y8nElNXa/wZ1+fuLEUVjZX8dk="; + HsOpenSSL = { + version = "0.11.7.5"; + sha256 = "sha256-CfH1YJSGuF4O1aUfdJwUZKRrVzv5nSPhwoI7mf9ewEg="; }; - th-desugar = { - version = "1.13"; - sha256 = "sha256-xiAeSM2umcfsz5+mcW+oGKf/EmzvH0ch0lHoKBGzW9I="; + http2 = { + version = "4.0.0"; + sha256 = "sha256-9rBhklwuuKZXWH4yV4tb7Sp5chR9AmBAMRBztDjx0uI="; }; }; # Name -> Source -> Maybe Subpath -> Drv diff --git a/nix/manual-overrides.nix b/nix/manual-overrides.nix index adeb4266477..807e39fbd1d 100644 --- a/nix/manual-overrides.nix +++ b/nix/manual-overrides.nix @@ -9,11 +9,10 @@ hself: hsuper: { hashtables = hsuper.hashtables_1_3; invertible = hlib.markUnbroken hsuper.invertible; lens-datetime = hlib.markUnbroken (hlib.doJailbreak hsuper.lens-datetime); - multihash = hlib.markUnbroken (hlib.doJailbreak hsuper.multihash); network-arbitrary = hlib.markUnbroken (hlib.doJailbreak hsuper.network-arbitrary); one-liner = hlib.doJailbreak hsuper.one-liner; polysemy = hlib.doJailbreak hsuper.polysemy; - polysemy-check = hlib.doJailbreak hsuper.polysemy-check; + polysemy-check = hlib.markUnbroken (hlib.doJailbreak hsuper.polysemy-check); polysemy-plugin = hlib.doJailbreak hsuper.polysemy-plugin; quickcheck-state-machine = hlib.dontCheck hsuper.quickcheck-state-machine; servant-foreign = hlib.doJailbreak hsuper.servant-foreign; diff --git a/services/brig/brig.cabal b/services/brig/brig.cabal index 23fa66e5955..3e4d9ef358d 100644 --- a/services/brig/brig.cabal +++ b/services/brig/brig.cabal @@ -248,7 +248,6 @@ library , mmorph , MonadRandom >=0.5 , mtl >=2.1 - , multihash >=0.1.3 , mwc-random , network >=2.4 , network-conduit-tls diff --git a/services/brig/default.nix b/services/brig/default.nix index e503c7492cd..c5c3f341875 100644 --- a/services/brig/default.nix +++ b/services/brig/default.nix @@ -80,7 +80,6 @@ , mmorph , MonadRandom , mtl -, multihash , mwc-random , network , network-conduit-tls @@ -233,7 +232,6 @@ mkDerivation { mmorph MonadRandom mtl - multihash mwc-random network network-conduit-tls diff --git a/tools/db/inconsistencies/default.nix b/tools/db/inconsistencies/default.nix index 6108d7797cc..59820314dd0 100644 --- a/tools/db/inconsistencies/default.nix +++ b/tools/db/inconsistencies/default.nix @@ -21,7 +21,6 @@ , imports , lens , lib -, multihash , optparse-applicative , saml2-web-sso , string-conversions @@ -57,7 +56,6 @@ mkDerivation { http-client imports lens - multihash optparse-applicative saml2-web-sso string-conversions diff --git a/tools/db/inconsistencies/inconsistencies.cabal b/tools/db/inconsistencies/inconsistencies.cabal index 555ee87b25a..152c0744681 100644 --- a/tools/db/inconsistencies/inconsistencies.cabal +++ b/tools/db/inconsistencies/inconsistencies.cabal @@ -83,7 +83,6 @@ executable inconsistencies , http-client , imports , lens - , multihash , optparse-applicative , saml2-web-sso , string-conversions From 211db89ecf247653588375737f04b7c7248ca6d5 Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Wed, 1 Mar 2023 09:58:58 +0100 Subject: [PATCH 2/3] Bring back forked http-client The ssl-util package relies on the fork. This is most likely obsolete, to be dealt with in another PR. --- nix/haskell-pins.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nix/haskell-pins.nix b/nix/haskell-pins.nix index 1823e758639..1a59b723a1d 100644 --- a/nix/haskell-pins.nix +++ b/nix/haskell-pins.nix @@ -104,6 +104,19 @@ let sha256 = "16hj3i4h5rwhr8kqrs7345wg7v10ahwjd3fdp2qx3c5z4qls6prr"; }; }; + http-client = { + src = fetchgit { + url = "https://github.com/wireapp/http-client"; + rev = "9100baeddbd15d93dc58a826ae812dafff29d5fd"; + sha256 = "16n340bg5vdb169f6d6421hx13wyqdsb5b314r823v34r8p0b19z"; + }; + packages = { + http-client = "http-client"; + http-client-openssl = "http-client-openssl"; + http-client-tls = "http-client-tls"; + http-conduit = "http-conduit"; + }; + }; hspec-wai = { src = fetchgit { url = "https://github.com/wireapp/hspec-wai"; From e7713331e345d546da58348c7114ad77c0382f39 Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Wed, 1 Mar 2023 10:42:57 +0100 Subject: [PATCH 3/3] Fix compile error due to http2 bump --- libs/wire-api-federation/src/Wire/API/Federation/Error.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/wire-api-federation/src/Wire/API/Federation/Error.hs b/libs/wire-api-federation/src/Wire/API/Federation/Error.hs index 6cc12cdeda0..1f6f297e80c 100644 --- a/libs/wire-api-federation/src/Wire/API/Federation/Error.hs +++ b/libs/wire-api-federation/src/Wire/API/Federation/Error.hs @@ -84,7 +84,7 @@ import qualified Data.Text.Lazy as LT import Imports import Network.HTTP.Types.Status import qualified Network.HTTP.Types.Status as HTTP -import qualified Network.HTTP2.Frame as HTTP2 +import qualified Network.HTTP2.Client as HTTP2 import qualified Network.Wai.Utilities.Error as Wai import OpenSSL.Session (SomeSSLException) import Servant.Client