diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 1fe4b6f2f466..756cac1f4c62 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1695,6 +1695,12 @@ self: super: { (appendPatches [./patches/pattern-arrows-add-fix-import.patch]) ]; + # 2024-03-19: Fix for mtl >= 2.3 + cheapskate = lib.pipe super.cheapskate [ + doJailbreak + (appendPatches [./patches/cheapskate-mtl-2-3-support.patch]) + ]; + # 2020-06-24: Tests are broken in hackage distribution. # See: https://github.com/robstewart57/rdf4h/issues/39 rdf4h = dontCheck super.rdf4h; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 662e147a00ae..7d846b9d4572 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -745,7 +745,6 @@ broken-packages: - chatty-text # failure in job https://hydra.nixos.org/build/233199498 at 2023-09-02 - chatty-utils # failure in job https://hydra.nixos.org/build/252710715 at 2024-03-16 - chatwork # failure in job https://hydra.nixos.org/build/233240489 at 2023-09-02 - - cheapskate # failure in job https://hydra.nixos.org/build/233197892 at 2023-09-02 - check-cfg-ambiguity # failure in job https://hydra.nixos.org/build/233251852 at 2023-09-02 - checked # failure in job https://hydra.nixos.org/build/233223182 at 2023-09-02 - Checked # failure in job https://hydra.nixos.org/build/233257598 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/patches/cheapskate-mtl-2-3-support.patch b/pkgs/development/haskell-modules/patches/cheapskate-mtl-2-3-support.patch new file mode 100644 index 000000000000..de376ea8726c --- /dev/null +++ b/pkgs/development/haskell-modules/patches/cheapskate-mtl-2-3-support.patch @@ -0,0 +1,23 @@ +diff --git a/Cheapskate/Parse.hs b/Cheapskate/Parse.hs +index b90d8e5..2925132 100644 +--- a/Cheapskate/Parse.hs ++++ b/Cheapskate/Parse.hs +@@ -1,4 +1,5 @@ + {-# LANGUAGE OverloadedStrings #-} ++{-# LANGUAGE CPP #-} + module Cheapskate.Parse ( + markdown + ) where +@@ -21,6 +22,12 @@ import Control.Applicative + import qualified Data.Map as M + import Data.List (intercalate) + ++#if MIN_VERSION_mtl(2, 3, 0) ++import Control.Monad (guard, unless, replicateM) ++#else ++#endif ++ ++ + import Debug.Trace + + -- | Parses the input as a markdown document. Note that 'Doc' is an instance