From f754109ecfdf6a2921a06fd4885de1cb818b8bee Mon Sep 17 00:00:00 2001 From: lukasepple Date: Fri, 6 Aug 2021 14:56:42 +0200 Subject: [PATCH] haskellPackages: fix build failures related to test main file casing A few libraries published by https://github.com/typeclasses/ have the issue that they have a test suite with its Main module in hegehog.hs. On darwin GHC can't distinguish between Hedgehog.hs and hedgehog.hs due to the case insensitive file system and will raise an issue about this. --- .../haskell-modules/configuration-darwin.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 9ce12f7ff9c4..7ecc15fce717 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -229,4 +229,19 @@ self: super: { # Work around SDL_main.h redefining main to SDL_main SDL-ttf = appendPatch super.SDL-ttf ./patches/SDL-ttf-darwin-hsc.patch; + # Disable a bunch of test suites that fail because of darwin's case insensitive + # file system: When a test suite has a test suite file that has the same name + # as a module in scope, but in different case (e. g. hedgehog.hs and Hedgehog + # in scope), GHC will complain that the file name and module name differ (in + # the example hedgehog.hs would be Main). + # These failures can easily be fixed by upstream by renaming files, so we + # should create issues for them. + # https://github.com/typeclasses/aws-cloudfront-signed-cookies/issues/2 + aws-cloudfront-signed-cookies = dontCheck super.aws-cloudfront-signed-cookies; + # https://github.com/typeclasses/assoc-list/issues/2 + assoc-list = dontCheck super.assoc-list; + assoc-listlike = dontCheck super.assoc-listlike; + # https://github.com/typeclasses/dsv/issues/1 + dsv = dontCheck super.dsv; + }