From 4c46e82769847177f6582447f027a56f9b555fd0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 21 Nov 2025 14:51:23 +0100 Subject: ... --- overlays/spm/default.nix | 3 ++- overlays/spm/lib/Spm/Api.hs | 19 +++++++++---------- overlays/spm/server/Spm/Server.hs | 7 ++++--- overlays/spm/server/Spm/Server/Ctx.hs | 3 +-- overlays/spm/server/Spm/Server/Database.hs | 9 ++++----- 5 files changed, 20 insertions(+), 21 deletions(-) (limited to 'overlays/spm') diff --git a/overlays/spm/default.nix b/overlays/spm/default.nix index ff135279..bd81ef82 100644 --- a/overlays/spm/default.nix +++ b/overlays/spm/default.nix @@ -4,10 +4,11 @@ let # defaultPackages = (import ./stackage.nix {}); # haskellPackages = defaultPackages // argumentPackages; # haskellPackages = argumentPackages; - haskellPackages = final.haskell.packages.ghc96.override { + haskellPackages = final.haskell.packages.ghc912.override { overrides = self: super: { warp-systemd = final.haskell.lib.doJailbreak (super.warp-systemd.overrideAttrs (oldAttrs: { meta = oldAttrs.meta // { broken = false; }; })); unliftio-pool = final.haskell.lib.doJailbreak super.unliftio-pool; + cryptonite = super.cryptonite.overrideAttrs (oldAttrs: { doCheck = false; }); # servant-server = super.servant-server.overrideAttrs (oldAttrs: { # patches = []; # }); diff --git a/overlays/spm/lib/Spm/Api.hs b/overlays/spm/lib/Spm/Api.hs index 8285cc55..3c22bfb6 100644 --- a/overlays/spm/lib/Spm/Api.hs +++ b/overlays/spm/lib/Spm/Api.hs @@ -21,7 +21,6 @@ import Data.Text (Text) import qualified Data.Text as Text import GHC.Generics (Generic) -import Type.Reflection (Typeable) import Control.Lens @@ -62,7 +61,7 @@ instance FromHttpApiData SpmStyle where newtype SpmMailbox = SpmMailbox { unSpmMailbox :: CI Text } - deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (MimeRender PlainText) makeWrapped ''SpmMailbox @@ -70,7 +69,7 @@ instance MimeRender JSON SpmMailbox where mimeRender p mbox = mimeRender p $ JSON.object [ "mailbox" JSON..= unSpmMailbox mbox ] newtype SpmDomain = SpmDomain { unSpmDomain :: CI Text } - deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (MimeRender PlainText) makeWrapped ''SpmDomain @@ -79,17 +78,17 @@ instance MimeRender JSON SpmDomain where newtype SpmLocal = SpmLocal { unSpmLocal :: CI Text - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (ToJSON, FromJSON) makeWrapped ''SpmLocal newtype SpmExtension = SpmExtension { unSpmExtension :: CI Text - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (ToJSON, FromJSON) makeWrapped ''SpmExtension data SpmMappingState = Valid | Reject - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance MimeRender PlainText SpmMappingState where mimeRender p = mimeRender @_ @Text p . \case Valid -> "valid" @@ -109,15 +108,15 @@ _SpmMappingStateReject = iso toReject fromReject data SpmMappingListingItem = SpmMappingListingItem { smlMapping :: SpmMapping , smlState :: SpmMappingState - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) newtype SpmMappingListing = SpmMappingListing { unSpmMappingListing :: [SpmMappingListingItem] } - deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + deriving stock (Eq, Ord, Read, Show, Generic) data SpmMapping = SpmMapping { spmMappingLocal :: Maybe SpmLocal , spmMappingExtension :: Maybe SpmExtension - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) _SpmMappingText :: Iso' SpmMapping Text _SpmMappingText = iso toText fromText @@ -170,7 +169,7 @@ instance ToJSON SpmMappingListing where data SpmJWTClaims = SpmJWTClaims { spmjwtStdClaims :: ClaimsSet , spmjwtLocal :: SpmLocal - } deriving stock (Eq, Show, Generic, Typeable) + } deriving stock (Eq, Show, Generic) makeLensesFor [("spmjwtStdClaims", "_stdClaims"), ("spmjwtLocal", "_spmjwtLocal")] ''SpmJWTClaims diff --git a/overlays/spm/server/Spm/Server.hs b/overlays/spm/server/Spm/Server.hs index 8e7f8786..dc334729 100644 --- a/overlays/spm/server/Spm/Server.hs +++ b/overlays/spm/server/Spm/Server.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -Wno-orphans #-} + {-# LANGUAGE OverloadedStrings #-} module Spm.Server @@ -24,7 +26,6 @@ import Data.Attoparsec.Text import qualified Data.ByteString.Lazy as LBS import GHC.Generics (Generic) -import Type.Reflection (Typeable) import Control.Applicative import Control.Monad @@ -101,7 +102,7 @@ hSslClientSDn = "SSL-Client-S-DN" data SSLClientVerify = SSLClientVerifySuccess | SSLClientVerifyOther Text - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance FromHttpApiData SSLClientVerify where parseUrlPiece = (left Text.pack .) . parseOnly $ p <* endOfInput where @@ -163,7 +164,7 @@ data ServerCtxError | ServerCtxNoCredentialsDirectory | ServerCtxJwkSetDecodeError String | ServerCtxJwkSetEmpty - deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + deriving stock (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) mkSpmApp :: (MonadUnliftIO m, MonadThrow m) => m Application diff --git a/overlays/spm/server/Spm/Server/Ctx.hs b/overlays/spm/server/Spm/Server/Ctx.hs index 18452a0a..1d228043 100644 --- a/overlays/spm/server/Spm/Server/Ctx.hs +++ b/overlays/spm/server/Spm/Server/Ctx.hs @@ -11,7 +11,6 @@ import Database.Persist.Postgresql import UnliftIO.Pool import Control.Lens.TH -import Type.Reflection (Typeable) import GHC.Generics (Generic) @@ -19,6 +18,6 @@ data ServerCtx = ServerCtx { _sctxSqlPool :: Pool SqlBackend , _sctxInstanceId :: UUID , _sctxJwkSet :: JWKSet - } deriving (Generic, Typeable) + } deriving (Generic) makeLenses ''ServerCtx diff --git a/overlays/spm/server/Spm/Server/Database.hs b/overlays/spm/server/Spm/Server/Database.hs index 3156e920..4405452f 100644 --- a/overlays/spm/server/Spm/Server/Database.hs +++ b/overlays/spm/server/Spm/Server/Database.hs @@ -13,7 +13,6 @@ import Database.Persist.Sql import Database.Persist.TH import GHC.Generics (Generic) -import Type.Reflection (Typeable) import Data.Text (Text) @@ -33,22 +32,22 @@ import Web.HttpApiData newtype MailMailbox = MailMailbox { unMailMailbox :: CI Text - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (PersistField, PersistFieldSql) makeWrapped ''MailMailbox newtype MailLocal = MailLocal { unMailLocal :: CI Text - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (PersistField, PersistFieldSql) makeWrapped ''MailLocal newtype MailExtension = MailExtension { unMailExtension :: CI Text - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (PersistField, PersistFieldSql) makeWrapped ''MailExtension newtype MailDomain = MailDomain { unMailDomain :: CI Text - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (PersistField, PersistFieldSql) makeWrapped ''MailDomain -- cgit v1.2.3