about summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/10/default.nix
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2022-08-19 20:50:23 +0300
committerGitHub <noreply@github.com>2022-08-19 20:50:23 +0300
commit9adf0c2035e48c23aa41ce19d209475655e04c4e (patch)
tree2f34010afebba2d5ae8ce447acbaf9008b0794a5 /pkgs/development/compilers/gcc/10/default.nix
parent51422b1831366cd8ee56d340bc4183d841dc2d33 (diff)
parentf16be229dcb9e3bb914820ed0f74a0009b0235dc (diff)
Merge pull request #185972 from Artturin/gccstrictdeps
gcc/: correct gnused conditionals
Diffstat (limited to 'pkgs/development/compilers/gcc/10/default.nix')
-rw-r--r--pkgs/development/compilers/gcc/10/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix
index dbfdbb79be995..4476f1a397655 100644
--- a/pkgs/development/compilers/gcc/10/default.nix
+++ b/pkgs/development/compilers/gcc/10/default.nix
@@ -33,7 +33,7 @@
 assert libelf != null -> zlib != null;
 
 # Make sure we get GNU sed.
-assert stdenv.hostPlatform.isDarwin -> gnused != null;
+assert stdenv.buildPlatform.isDarwin -> gnused != null;
 
 # The go frontend is written in c++
 assert langGo -> langCC;
@@ -159,6 +159,9 @@ stdenv.mkDerivation ({
   nativeBuildInputs = [ texinfo which gettext ]
     ++ (optional (perl != null) perl)
     ++ (optional langAda gnatboot)
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional buildPlatform.isDarwin gnused)
     ;
 
   # For building runtime libs
@@ -177,9 +180,6 @@ stdenv.mkDerivation ({
     targetPackages.stdenv.cc.bintools # For linking code at run-time
   ] ++ (optional (isl != null) isl)
     ++ (optional (zlib != null) zlib)
-    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
-    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
-    ++ (optional hostPlatform.isDarwin gnused)
     ;
 
   depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;