diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 68a2e93cb5ff..faabd30fa08c 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -145,7 +145,8 @@ self: super: configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; propagatedBuildInputs = [ self.libSM ]; - CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + CPP = if stdenv.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -"; outputs = [ "out" "dev" "devdoc" ]; });