cached-nix-shell icon indicating copy to clipboard operation
cached-nix-shell copied to clipboard

`cached-nix-shell` blocks certain environment variables that `nix-shell` doesn't.

Open uri-canva opened this issue 1 year ago • 0 comments

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 that nix-shell keeps (https://sourcegraph.com/github.com/NixOS/[email protected]/-/blob/src/nix-build/nix-build.cc?L107-110) are not in sync. The environment variables that cached-nix-shell keeps in addition are not an issue since the --pure will have the nix-shell invocation strip them anyway if needed, but the ones that are missing lead to a difference in behaviour when using cached-nix-shell as a drop in replacement of nix-shell. For example not keeping TERM results in bash defaulting to dumb and setting it in the environment (https://sourcegraph.com/github.com/bminor/[email protected]/-/blob/variables.c?L496), leading to programs disabling ncurses and similar terminal UIs.

uri-canva avatar Aug 08 '22 07:08 uri-canva