From 51990439e9297087e1f6dc939c2efd7ea27069d4 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 21 Nov 2022 14:48:39 +0100 Subject: [PATCH] hpack: work around test suite choking on CRLF --- pkgs/development/haskell-modules/configuration-common.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 9d8515613029..40ba9a84b6a6 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1050,6 +1050,14 @@ self: super: { # dontCheck: use of non-standard strptime "%s" which musl doesn't support; only used in test unix-time = if pkgs.stdenv.hostPlatform.isMusl then dontCheck super.unix-time else super.unix-time; + # Workaround for https://github.com/sol/hpack/issues/528 + # The hpack test suite can't deal with the CRLF line endings hackage revisions insert + hpack = overrideCabal (drv: { + postPatch = drv.postPatch or "" + '' + "${lib.getBin pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal + ''; + }) super.hpack; + # hslua has tests that appear to break when using musl. # https://github.com/hslua/hslua/issues/106 # Note that hslua is currently version 1.3. However, in the latest version