You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to install gcc10 using nix-shell --pure -p gcc10, it seems to install gcc10. However, it's not available in the path and somehow gcc 9.3.0 is available in the path.
To Reproduce
Steps to reproduce the behavior:
nix-shell --pure -p gcc10
gcc --version
Expected behavior
I'd expect that gcc10 is available in the path after making a shell with the command listed above.
Actual behavior
$ gcc --version
gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Additional context
It seems like gcc10 is actually added to my store when running the command. I see that /nix/store/hzzgaw8ga9sfa8nk97h3xdmrhbdc55lj-gcc-10.1.0 is created and it indeed contains gcc10. However, I'd expect that making a pure shell with gcc10 would not result in the gcc9 package being available.
I also don't have gcc installed in my profile (nixos/configuration).
What's weird is that doing this does resolve to gcc10:
#shell.nix
with import <nixpkgs> {}; {
qpidEnv = stdenvNoCC.mkDerivation {
name = "gcc10-environment";
buildInputs = [
pkgs.gcc10
];
};
}
The pure shell contains stdenv and gcc10. But stdenv itself contains gcc9. You must use gcc10Stdenv instead of stdenv. This cannot be done on the command line only, you must use a file:
Describe the bug
When I try to install gcc10 using
nix-shell --pure -p gcc10
, it seems to install gcc10. However, it's not available in the path and somehow gcc 9.3.0 is available in the path.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'd expect that gcc10 is available in the path after making a shell with the command listed above.
Actual behavior
Additional context
It seems like gcc10 is actually added to my store when running the command. I see that
/nix/store/hzzgaw8ga9sfa8nk97h3xdmrhbdc55lj-gcc-10.1.0
is created and it indeed contains gcc10. However, I'd expect that making a pure shell with gcc10 would not result in the gcc9 package being available.I also don't have gcc installed in my profile (
nixos/configuration
).What's weird is that doing this does resolve to gcc10:
Notify maintainers
@Synthetica9 @vnucat (can't tag, don't know why...)
Metadata
"x86_64-linux"
Linux 5.6.15-hardened, NixOS, 20.09pre227577.135073a87b7 (Nightingale)
yes
yes
nix-env (Nix) 2.3.5
""
"nixos-20.09pre228204.467ce5a9f45, nixpkgs-20.09pre228204.467ce5a9f45"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
The text was updated successfully, but these errors were encountered: