diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index 41461a26d425f..368bc76bf0e2a 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -421,7 +421,10 @@ stdenv.mkDerivation rec { # Our Cabal compiler name haskellCompilerName = "ghc-${version}"; - } // lib.optionalAttrs (binDistUsed.isHadrian or false) { + } + # We duplicate binDistUsed here since we have a sensible default even if no bindist is avaible, + # this makes sure that getting the `meta` attribute doesn't throw even on unsupported platforms. + // lib.optionalAttrs (ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}.isHadrian or false) { # Normal GHC derivations expose the hadrian derivation used to build them # here. In the case of bindists we just make sure that the attribute exists, # as it is used for checking if a GHC derivation has been built with hadrian. diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index 22552fa67fb2f..73ce0c9185744 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -417,7 +417,10 @@ stdenv.mkDerivation rec { # Our Cabal compiler name haskellCompilerName = "ghc-${version}"; - } // lib.optionalAttrs (binDistUsed.isHadrian or false) { + } + # We duplicate binDistUsed here since we have a sensible default even if no bindist is avaible, + # this makes sure that getting the `meta` attribute doesn't throw even on unsupported platforms. + // lib.optionalAttrs (ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}.isHadrian or false) { # Normal GHC derivations expose the hadrian derivation used to build them # here. In the case of bindists we just make sure that the attribute exists, # as it is used for checking if a GHC derivation has been built with hadrian. diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix index 79b006ce5537b..93380fd14519c 100644 --- a/pkgs/development/compilers/ghc/9.2.4-binary.nix +++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix @@ -403,7 +403,10 @@ stdenv.mkDerivation rec { # Our Cabal compiler name haskellCompilerName = "ghc-${version}"; - } // lib.optionalAttrs (binDistUsed.isHadrian or false) { + } + # We duplicate binDistUsed here since we have a sensible default even if no bindist is avaible, + # this makes sure that getting the `meta` attribute doesn't throw even on unsupported platforms. + // lib.optionalAttrs (ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}.isHadrian or false) { # Normal GHC derivations expose the hadrian derivation used to build them # here. In the case of bindists we just make sure that the attribute exists, # as it is used for checking if a GHC derivation has been built with hadrian.