Skip to content

Commit a593906

Browse files
committed
Fixes for tests
1 parent b26bd95 commit a593906

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

test/cabal-doctests/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ let
2020
};
2121

2222
in recurseIntoAttrs ({
23+
# Making cabal-doctest work for cross compilers will be difficult.
24+
meta.disabled = stdenv.buildPlatform != stdenv.hostPlatform || builtins.compareVersions
25+
buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.0" >= 0;
2326
ifdInputs = {
2427
plan-nix = addMetaAttrs meta project.plan-nix;
2528
};
@@ -35,8 +38,6 @@ in recurseIntoAttrs ({
3538

3639
meta = {
3740
platforms = platforms.all;
38-
# Making cabal-doctest work for cross compilers will be difficult.
39-
disabled = stdenv.buildPlatform != stdenv.hostPlatform;
4041
};
4142

4243
passthru = {

test/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
with pkgs;
1111

1212
let
13+
inherit (import ../ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
14+
isDisabled = d: d.meta.disabled or false;
15+
1316
# Set recurseForDerivations for both children and grand-children values in
1417
# the input association list, but only if the key is "ifdInputs".
1518
#
@@ -241,7 +244,8 @@ let
241244
# - input ifdLevel is 3 or greater: return allTests
242245
optionalIfdTests = ifdLevel:
243246
pkgs.lib.optionalAttrs (ifdLevel > 1) (allTestsWithIfdInputs ifdLevel);
244-
in pkgs.recurseIntoAttrs (optionalIfdTests ifdLevel)
247+
in filterAttrsOnlyRecursive (_: v: !(isDisabled v))
248+
(pkgs.recurseIntoAttrs (optionalIfdTests ifdLevel))
245249

246250
## more possible test cases
247251
# 1. fully static linking

test/haskell-language-server/cabal.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ in recurseIntoAttrs {
66
inherit (project) plan-nix;
77
};
88
build = project.getComponent "haskell-language-server:exe:haskell-language-server";
9+
10+
# Haskell Language Server does not build for GHC 9 yet
11+
meta.disabled = builtins.compareVersions
12+
buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.0" >= 0;
913
}

0 commit comments

Comments
 (0)