Open Aviksaikat opened 7 months ago
I am getting the same error on Debian GNU/Linux 11 (bullseye).
I have a fresh install of both debian and nix, and whenever I run nix-env -i
with any package, I get the first 9 lines of the above error, every one starting with cudaPackages.
I'm also getting the same trace warnings with nix 2.21.2 running in Red Hat Enterprise Linux 9.3 (Plow), single user installation (--no-daemon)
I'm getting similar warnings with nix 2.21.2
on Ubuntu 20.04 LTS.
These are Nixpkgs warnings that get triggered on recent nixos-unstable
versions. I'm not sure why they suddently started popping-up, but the root cause lies in Nixpkgs itself. Moving the issue there as a consequence.
For more context: I can reproduce this with any reasonable Nix version on nixos-unstable
. nixos-23.11
doesn't exhibit this.
$ nix-env -f channel:nixos-23.11 -u
$ nix-env -f channel:nixos-unstable -u
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddOpenGLRunpathHook is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoFixElfFiles is deprecated, use pkgs.autoFixElfFiles instead
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddOpenGLRunpathHook is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoFixElfFiles is deprecated, use pkgs.autoFixElfFiles instead
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddOpenGLRunpathHook is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoFixElfFiles is deprecated, use pkgs.autoFixElfFiles instead
trace: warning: eww now can build for X11 and wayland simultaneously, so `eww-wayland` is deprecated, use the normal `eww` package instead.
trace: warning: lxd has been renamed to lxd-lts
trace: warning: lxd-unwrapped has been renamed to lxd-unwrapped-lts
trace: warning: nixfmt was renamed to nixfmt-classic. The nixfmt attribute may be used for the new RFC 166-style formatter in the future, which is currently available as nixfmt-rfc-style
trace: warning: nvtop has been renamed to nvtopPackages.full
trace: warning: nvtop-amd has been renamed to nvtopPackages.amd
trace: warning: nvtop-intel has been renamed to nvtopPackages.intel
trace: warning: nvtop-msm has been renamed to nvtopPackages.msm
trace: warning: nvtop-nvidia has been renamed to nvtopPackages.nvidia
trace: warning: writeReferencesToFile is deprecated in favour of writeClosure
This is caused by some packages starting to use lib.warn
for deprecations: https://github.com/NixOS/nixpkgs/blob/e5d9b197e9f13b29ca797e6a0aab21840eab64d4/pkgs/top-level/aliases.nix#L777
I wonder whether we should encourage this. Given the UX downsides, I lean towards "no".
I'd like to add that messages are also displayed multiple times, so I've got e.g. trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
thrice (I couldn't see any correlation from number of messages to number of packages).
Setup:
"x86_64-linux"
Linux 6.1.0-21-amd64, Debian GNU/Linux, 12 (bookworm), nobuild
yes
yes
nix-env (Nix) 2.22.1
"nixpkgs"
/nix/var/nix/profiles/per-user/root/channels/nixpkgs
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/how-to-introduce-a-breaking-version-bump/46746/9
I got the same...
as far as i can recall, i started seeing this only after i added the nvtopPackages.nvidia
in my etc/**/configuration.nix file.
$ sudo nixos-rebuild test
building Nix...
building the system configuration...
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
stopping the following units: accounts-daemon.service
$ nix-shell --version
nix-shell (Nix) 2.18.2
$ nix-info
system: "x86_64-linux",
multi-user?: yes,
version: nix-env (Nix) 2.18.2,
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
This is caused by some packages starting to use
lib.warn
for deprecations:
What if they did something like the following?
lxd = pkgs.lxd-lts // { outPath = lib.warn "lxd has been renamed to lxd-lts" lxd-lts.outPath; }
This doesn't cover everything; this should probably be handled by a function that adds it to all the outputs, so that a warning is emitted on instantiation, and not on attributes like name
, version
, type
and meta
.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-08-21-nix-team-meeting-minutes-171/50950/1
Describe the bug
Getting the following
trace warning
while doingnix-env -u
Steps To Reproduce
nix-env -u
Expected behavior
A clear and concise description of what you expected to happen.
nix-env --version
outputAdditional context
OS:
Kali GNU/Linux 2024.1
Priorities
Add :+1: to issues you find important.