Skip to content

Commit

Permalink
haskellPackages.terminfo: not a core pkg if cross compiling
Browse files Browse the repository at this point in the history
GHC's cross build flavours disable the terminfo package, so it will
never be included if we are cross-compiling – setting it to null thus
breaks all builds depending on the package.

To fix this problem, we use the versioned attribute generated by
hackage2nix, just like we do for xhtml.

Closes #182785.
  • Loading branch information
sternenseemann committed Jul 25, 2022
1 parent 7d66e14 commit f39aee2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
Expand Up @@ -38,7 +38,8 @@ self: super: {
rts = null;
stm = null;
template-haskell = null;
terminfo = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
Expand Up @@ -37,7 +37,8 @@ self: super: {
rts = null;
stm = null;
template-haskell = null;
terminfo = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
Expand Up @@ -37,7 +37,8 @@ self: super: {
rts = null;
stm = null;
template-haskell = null;
terminfo = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
Expand Up @@ -39,7 +39,8 @@ self: super: {
rts = null;
stm = null;
template-haskell = null;
terminfo = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix
Expand Up @@ -39,7 +39,8 @@ self: super: {
rts = null;
stm = null;
template-haskell = null;
terminfo = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/haskell-modules/configuration-ghc-head.nix
Expand Up @@ -47,7 +47,8 @@ self: super: {
rts = null;
stm = null;
template-haskell = null;
terminfo = null;
# GHC only builds terminfo if it is a native compiler
terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else self.terminfo_0_4_1_5;
text = null;
time = null;
transformers = null;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/release-haskell.nix
Expand Up @@ -326,6 +326,7 @@ let
random
QuickCheck
cabal2nix
terminfo # isn't bundled for cross
xhtml # isn't bundled for cross
;
};
Expand All @@ -337,6 +338,7 @@ let
random
QuickCheck
cabal2nix
terminfo # isn't bundled for cross
xhtml # isn't bundled for cross
;
};
Expand Down

0 comments on commit f39aee2

Please sign in to comment.