Hello, here is the situation:
I ran nix-shell -p dix, and it fails with undefined variable 'dix':
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'shell'
whose name attribute is located at /nix/store/px86fbsnq65agwvrxnylrxnxp6bpcl76-source/pkgs/stdenv/generic/make-derivation.nix:480:13
… while evaluating attribute 'buildInputs' of derivation 'shell'
at /nix/store/px86fbsnq65agwvrxnylrxnxp6bpcl76-source/pkgs/stdenv/generic/make-derivation.nix:535:13:
534| depsHostHost = elemAt (elemAt dependencies 1) 0;
535| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
536| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: undefined variable 'dix'
at «string»:1:107:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (dix) ]; } ""
| ^
Looking at NixOS Search, it seems to be due to it being only available on NixOS 25.05
Is this the expected error message in these cases ?
As a nix beginner it made me question whether I was doing something wrong or if the system had broken in some way
I’d happily open an issue if more appropriate, but I am not sure where to
Hmm, you’re not reading that right, it’s not available in 25.05, only 25.11 onwards. You should update your channels, 25.05 will be deprecated, like, next week, and no longer receive security updates.
Apparently; I feel like the message used to be different, but that’s what I’m getting too.
Did you properly update your channel and rebuild the system afterwards? I’m on NixOS 25.11 and I can open a shell just fine with dix. And I can confirm the package does not exist in 25.05, precisely what @TLATER said.
I don’t think this needs an issue opened because there’s no problem with Nix.
The error message itself might be confusing, but it is expected when Nix can’t find the package and I get that exact message when I try to open a shell with an non-existent package.
And I still think it doesn’t need an issue created because it works. It’s either a channel misconfiguration, or a system/Nix misconfiguration.
I would love to see the output of nix-channel --list and sudo nix-channel --list
The error message should tell you that the package can’t be found in clear language, rather than giving you an evaluation error when you as the user didn’t knowingly evaluate anything. This is an issue.
UX issues are still issues
@QuBe knows what the problem is and has already fixed it. They’re just trying to figure out how to report a UX issue; @QuBe you might want to mark the thread as solved so that’s a bit more obvious.