diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 9cf459f45167..f2f1bfc64e14 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -132,9 +132,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -290,9 +296,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 069657808a35..44d8d33fecc4 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -140,9 +140,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -293,9 +299,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index 3f2ea4dedca5..a778fda31a73 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -127,9 +127,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -255,9 +261,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index d1c69e5c4633..5442a423bdd0 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -126,9 +126,15 @@ let # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -258,9 +264,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 50bd9527093b..40dbe131f9dd 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -140,9 +140,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -278,9 +284,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);