diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index b93747058309..6e67bbf74e6b 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { langF77 = if nativeTools then false else gcc.langF77; shell = if shell == "" then stdenv.shell else shell; - meta = if gcc != null && (gcc ? meta) then gcc.meta else + meta = if gcc != null && (gcc ? meta) then removeAttrs gcc.meta ["priority"] else { description = "System C compiler wrapper"; }; diff --git a/pkgs/development/compilers/gcc-4.1/default.nix b/pkgs/development/compilers/gcc-4.1/default.nix index 0bbaf6d02b52..4473d8a229f2 100644 --- a/pkgs/development/compilers/gcc-4.1/default.nix +++ b/pkgs/development/compilers/gcc-4.1/default.nix @@ -54,5 +54,9 @@ stdenv.mkDerivation { homepage = "http://gcc.gnu.org/"; license = "GPL/LGPL"; description = "GNU Compiler Collection, 4.1.x"; + + # Give the real GCC a lower priority than the GCC wrapper so that + # both can be installed at the same time. + priority = "7"; }; }