From ca91080b21890aacef4e7b9e9465abcb37920aac Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 15 Dec 2021 11:23:42 +0100 Subject: [PATCH] maintainers/scripts/test-configurations.nix: skip binary GHCs While being able to test them is neat (on x86_64-linux they work very well, actually), we usually don't want to do this, since the set is only (recommended to be) used to bootstrap GHC. Consequently there is almost no binary cache and testing them mostly leads to unenlightening and seemingly endless compilation. --- .../scripts/haskell/test-configurations.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/maintainers/scripts/haskell/test-configurations.nix b/maintainers/scripts/haskell/test-configurations.nix index ed5d2fe066f2..05f26f861473 100644 --- a/maintainers/scripts/haskell/test-configurations.nix +++ b/maintainers/scripts/haskell/test-configurations.nix @@ -39,6 +39,12 @@ nix-build maintainers/scripts/haskell/test-configurations.nix \ --arg config '{ allowBroken = false; }' --keep-going + By default the haskell.packages.ghc*Binary sets used for bootstrapping GHC + are _not_ tested. You can change this using: + + nix-build maintainers/scripts/haskell/test-configurations.nix \ + --arg skipBinaryGHCs false --keep-going + */ { files ? [ "configuration-common.nix" @@ -48,6 +54,7 @@ , nixpkgsPath ? ../../.. , config ? { allowBroken = true; } , skipEvalErrors ? true +, skipBinaryGHCs ? true }: let @@ -70,8 +77,11 @@ let builtins.match "ghc-([0-9]+).([0-9]+).x" configName ); # return all package sets under haskell.packages matching the version components - setsForVersion = builtins.map (name: pkgs.haskell.packages.${name}) ( - builtins.filter (lib.hasPrefix "ghc${configVersion}") ( + setsForVersion = builtins.map (name: pkgs.haskell.packages.${name}) ( + builtins.filter (setName: + lib.hasPrefix "ghc${configVersion}" setName + && (skipBinaryGHCs -> !(lib.hasInfix "Binary" setName)) + ) ( builtins.attrNames pkgs.haskell.packages ) );