Warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment

I’ve just installed a modification of Nix via https://github.com/NixOS/nix/pull/3154.

When I run nix-shell in a folder that uses nix-shell https://holochain.love for a development shell, the output starts with:

warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment
these derivations will be built:

Similarly:

➜  hcr git:(develop) nh
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment

[nix-shell:~/hcr]$ 

NB: nh is an alias for nix-shell https://holochain.love.

Looks like I need to add export NIX_PATH=something to ~/.zshrc and maybe also ~/.bashrc as the nix-shell uses bash. However, given that it it’s built from a pull request, I’m not exactly sure what to put for something, let alone whether that is currently possible. Note that I was not able to get nix-shell to permanently work any other way.

Just to try hacking on something, I created a tar.gz file of the nix local folder (from the above PR), and tried to add export NIX_PATH="/home/jr/nix.tar.gz" to line 116 of my .bashrc, however this then happened:

➜  ~ source ~/.bashrc
/home/jr/.bashrc:type:64: bad option: -P
/home/jr/.bashrc:105: command not found: complete
/home/jr/.bashrc:111: command not found: shopt
/home/jr/.bashrc:113: command not found: shopt
/home/jr/.bashrc:119: command not found: shopt
\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]$\[\033[00m\] 

So I removed that line.

I didn’t change anything else. FWIW, my ~/.bashrc is here.

Oops, I ran source ~/.bashrc in zsh! I ran it bash and got [jr@lm ~]$ nh warning: syntax error, unexpected $undefined, at /home/jr/nix.tar.gz:1:1; will use bash from your environment. So the attempted hack didn’t work, and the line was removed.