Skip to content

Commit ff70982

Browse files
authored
[ghc-js] mark buildable and c-ffi as broken (#1899)
* [ghc-js] mark broken packages as broken and disable them. Apparently we had a lot of packages that built wit 8107-ghcjs, and are now broken :(
1 parent 655b61b commit ff70982

File tree

15 files changed

+101
-21
lines changed

15 files changed

+101
-21
lines changed

test/buildable/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ in recurseIntoAttrs {
2525
touch $out
2626
'';
2727

28-
meta.platforms = platforms.all;
28+
meta = rec {
29+
platforms = lib.platforms.all;
30+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
31+
disabled = broken;
32+
};
2933

3034
passthru = {
3135
# Attributes used for debugging with nix repl

test/c-ffi/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ in recurseIntoAttrs {
5555
touch $out
5656
'';
5757

58-
meta.platforms = platforms.all;
58+
meta = rec {
59+
platforms = lib.platforms.all;
60+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
61+
disabled = broken;
62+
};
5963

6064
passthru = {
6165
# Used for debugging with nix repl

test/cabal-hpack/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ in recurseIntoAttrs {
5656
touch $out
5757
'';
5858

59-
meta.platforms = platforms.all;
59+
meta = rec {
60+
platforms = lib.platforms.all;
61+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
62+
disabled = broken;
63+
};
6064

6165
passthru = {
6266
# Used for debugging with nix repl

test/cabal-simple/default.nix

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@ in recurseIntoAttrs {
3232
};
3333

3434
# Used for testing externally with nix-shell (../tests.sh).
35-
test-shell = project.shellFor { tools = { cabal = "latest"; }; withHoogle = !__elem compiler-nix-name ["ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924" "ghc925" "ghc926" "ghc927"]; };
35+
test-shell = (project.shellFor {
36+
tools = { cabal = "latest"; };
37+
withHoogle = !__elem compiler-nix-name ["ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924" "ghc925" "ghc926" "ghc927"];
38+
}).overrideAttrs (_: _: {
39+
meta = rec {
40+
platforms = lib.platforms.all;
41+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
42+
disabled = broken;
43+
};
44+
});
3645

3746
run = stdenv.mkDerivation {
3847
name = "cabal-simple-test";
@@ -64,7 +73,11 @@ in recurseIntoAttrs {
6473
touch $out
6574
'';
6675

67-
meta.platforms = platforms.all;
76+
meta = rec {
77+
platforms = lib.platforms.all;
78+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
79+
disabled = broken;
80+
};
6881

6982
passthru = {
7083
# Used for debugging with nix repl

test/cabal-source-repo-comments/default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ in recurseIntoAttrs {
2727
touch $out
2828
'';
2929

30-
meta.platforms = platforms.all;
31-
30+
meta = rec {
31+
platforms = lib.platforms.all;
32+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
33+
disabled = broken;
34+
};
35+
3236
passthru = {
3337
# Attributes used for debugging with nix repl
3438
inherit packages;

test/cabal-source-repo/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ in recurseIntoAttrs {
2727
touch $out
2828
'';
2929

30-
meta.platforms = platforms.all;
30+
meta = rec {
31+
platforms = lib.platforms.all;
32+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
33+
disabled = broken;
34+
};
3135

3236
passthru = {
3337
# Attributes used for debugging with nix repl

test/cabal-sublib/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ in recurseIntoAttrs {
5757
touch $out
5858
'';
5959

60-
meta.platforms = platforms.all;
60+
meta = rec {
61+
platforms = lib.platforms.all;
62+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
63+
disabled = broken;
64+
};
6165

6266
passthru = {
6367
# Used for debugging with nix repl

test/call-cabal-project-to-nix/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ in recurseIntoAttrs {
4040
touch $out
4141
'';
4242

43-
meta.platforms = platforms.all;
43+
meta = rec {
44+
platforms = lib.platforms.all;
45+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
46+
disabled = broken;
47+
};
4448

4549
passthru = {
4650
# Attributes used for debugging with nix repl

test/exe-only/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ in recurseIntoAttrs {
4444
touch $out
4545
'';
4646

47-
meta.platforms = platforms.all;
47+
meta = rec {
48+
platforms = lib.platforms.all;
49+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
50+
disabled = broken;
51+
};
4852

4953
passthru = {
5054
# Used for debugging with nix repl

test/extra-hackage/default.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ in recurseIntoAttrs {
5757
'')) + ''
5858
touch $out
5959
'';
60-
meta.platforms = platforms.all;
60+
61+
meta = rec {
62+
platforms = lib.platforms.all;
63+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
64+
disabled = broken;
65+
};
66+
6167
passthru = {
6268
inherit project;
6369
};

test/ghc-options/cabal.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ in recurseIntoAttrs {
3333
touch $out
3434
'';
3535

36-
meta.platforms = platforms.all;
36+
meta = rec {
37+
platforms = lib.platforms.all;
38+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
39+
disabled = broken;
40+
};
3741

3842
passthru = {
3943
# Attributes used for debugging with nix repl

test/ghc-options/stack.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ in recurseIntoAttrs {
3535
echo '${concatStringsSep " " packageNames}' > $out
3636
'';
3737

38-
meta.platforms = platforms.all;
38+
meta = rec {
39+
platforms = lib.platforms.all;
40+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
41+
disabled = broken;
42+
};
3943

4044
passthru = {
4145
# Attributes used for debugging with nix repl

test/project-flags/cabal.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ in recurseIntoAttrs {
2525
touch $out
2626
'';
2727

28-
meta.platforms = platforms.all;
28+
meta = rec {
29+
platforms = lib.platforms.all;
30+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
31+
disabled = broken;
32+
};
2933

3034
passthru = {
3135
# Attributes used for debugging with nix repl

test/project-flags/stack.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ in recurseIntoAttrs {
2626
touch $out
2727
'';
2828

29-
meta.platforms = platforms.all;
29+
meta = rec {
30+
platforms = lib.platforms.all;
31+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
32+
disabled = broken;
33+
};
3034

3135
passthru = {
3236
# Attributes used for debugging with nix repl

test/with-packages/default.nix

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,22 @@ let
3939
in recurseIntoAttrs {
4040
# Used for testing externally with nix-shell (../tests.sh).
4141
# This just adds cabal-install to the existing shells.
42-
test-shell = addCabalInstall library.shell;
42+
test-shell = (addCabalInstall library.shell).overrideAttrs (_: _: {
43+
meta = rec {
44+
platforms = lib.platforms.all;
45+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
46+
disabled = broken;
47+
};
48+
});
4349

4450
# A variant of test-shell with the component option doExactConfig enabled
45-
test-shell-dec = addCabalInstall decLibrary.shell;
51+
test-shell-dec = (addCabalInstall decLibrary.shell).overrideAttrs (_: _: {
52+
meta = rec {
53+
platforms = lib.platforms.all;
54+
broken = stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"];
55+
disabled = broken;
56+
};
57+
});
4658

4759
run = stdenv.mkDerivation {
4860
name = "with-packages-test";
@@ -94,9 +106,10 @@ in recurseIntoAttrs {
94106

95107
dontInstall = true;
96108

97-
meta = {
98-
platforms = platforms.all;
99-
disabled = stdenv.hostPlatform.isMusl;
109+
meta = rec {
110+
platforms = lib.platforms.all;
111+
broken = (stdenv.hostPlatform.isGhcjs && __elem compiler-nix-name ["ghc961"]) || stdenv.hostPlatform.isMusl;
112+
disabled = broken;
100113
};
101114

102115
passthru = {

0 commit comments

Comments
 (0)