From f39aee2d8b8cf527a4a13f90bd57c8ceb345f3d7 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 25 Jul 2022 23:42:29 +0200 Subject: [PATCH] haskellPackages.terminfo: not a core pkg if cross compiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix | 3 ++- pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix | 3 ++- pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix | 3 ++- pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix | 3 ++- pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix | 3 ++- pkgs/development/haskell-modules/configuration-ghc-head.nix | 3 ++- pkgs/top-level/release-haskell.nix | 2 ++ 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index 48972849cf6aa6..fb976a7b331aa6 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -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; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix index 11c3677913ea46..48c63f8b723fd9 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix @@ -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; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix index a6fad258cf8572..8174307b7e6c5e 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix @@ -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; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index 127f3225c297b9..a5914433a448aa 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -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; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix index caef6641164ab4..53e604fbff30b3 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix @@ -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; diff --git a/pkgs/development/haskell-modules/configuration-ghc-head.nix b/pkgs/development/haskell-modules/configuration-ghc-head.nix index ad3aea047ae324..a2546c3dc5f442 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-head.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-head.nix @@ -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; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 17ec8528e40838..6ab31c7474771f 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -326,6 +326,7 @@ let random QuickCheck cabal2nix + terminfo # isn't bundled for cross xhtml # isn't bundled for cross ; }; @@ -337,6 +338,7 @@ let random QuickCheck cabal2nix + terminfo # isn't bundled for cross xhtml # isn't bundled for cross ; };