diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index f87aee89d453..d7f64e0ce04c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -212,7 +212,19 @@ self: super: builtins.intersectAttrs super { mime-mail = appendConfigureFlag super.mime-mail "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"sendmail\""; # Help the test suite find system timezone data. - tz = overrideCabal super.tz (drv: { preConfigure = "export TZDIR=${pkgs.tzdata}/share/zoneinfo"; }); + tz = overrideCabal super.tz (drv: { + preConfigure = "export TZDIR=${pkgs.tzdata}/share/zoneinfo"; + patches = [ + # Fix tests failing with libSystem, musl etc. due to a lack of + # support for glibc's non-POSIX TZDIR environment variable. + # https://github.com/nilcons/haskell-tz/pull/29 + (pkgs.fetchpatch { + name = "support-non-glibc-tzset.patch"; + url = "https://github.com/sternenseemann/haskell-tz/commit/64928f1a50a1a276a718491ae3eeef63abcdb393.patch"; + sha256 = "1f53w8k1vpy39hzalyykpvm946ykkarj2714w988jdp4c2c4l4cf"; + }) + ] ++ (drv.patches or []); + }); # Nix-specific workaround xmonad = appendPatch (dontCheck super.xmonad) ./patches/xmonad-nix.patch;