-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cached-nix-shell
blocks certain environment variables that nix-shell
doesn't.
#26
Comments
Rather than trying to replicate all the behavior of nix-shell, wouldn’t it be easier to record the path to the shell’s .drv file in the cache (instead of the environment variables), and then simply |
I've added the logic to fetch
No, it would still be slow. This way you'll get rid of the nix expression evaluation stage (which is slow), but you still have to run
|
The list of environment variables that
cached-nix-shell
keeps (https://sourcegraph.com/github.com/xzfc/cached-nix-shell@1955b9d0aaaf90337541ab799d5071eeaac2360c/-/blob/src/main.rs?L172-184) and thatnix-shell
keeps (https://sourcegraph.com/github.com/NixOS/nix@2.10.3/-/blob/src/nix-build/nix-build.cc?L107-110) are not in sync. The environment variables thatcached-nix-shell
keeps in addition are not an issue since the--pure
will have thenix-shell
invocation strip them anyway if needed, but the ones that are missing lead to a difference in behaviour when usingcached-nix-shell
as a drop in replacement ofnix-shell
. For example not keepingTERM
results in bash defaulting todumb
and setting it in the environment (https://sourcegraph.com/github.com/bminor/bash@bash-5.1/-/blob/variables.c?L496), leading to programs disabling ncurses and similar terminal UIs.The text was updated successfully, but these errors were encountered: