Nix Pill 10.1: Dropped out of nix-shell due to expected make error

Hey All,

Im not sure what I am doing wrong here so would appreciate some insight.

In Nix Pill 10.1 (Nix Pills | Nix & NixOS) it says the following:

That means we can source our , and it will build the derivation. You may get an error in the installation phase, because the user may not have the permission to write to /nix/store :
[nix-shell]$ source …
It didn’t install, but it built. Things to notice:
We sourced, therefore it ran all the steps including setting up the PATH for us.
The working directory is no more a temp directory created by nix-build, but the current directory. Therefore, hello-2.10 has been unpacked there.
We’re able to cd into hello-2.10 and type make , because now it’s available.
In other words, nix-shell drops us in a shell with the same (or almost) environment used to run the builder!

When I attempt the code source in the nix-shell I get the following error (as described in the pill above):

make[2]: Leaving directory ‘/home/andrew/nix_pills/testing/hello-2.10/po’
make[2]: Entering directory ‘/home/andrew/nix_pills/testing/hello-2.10’
make[3]: Entering directory ‘/home/andrew/nix_pills/testing/hello-2.10’
/nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin/mkdir -p ‘/nix/store/c0prxmlyhzsgjxv0y52w002aw06bi34k-hello/bin’
/nix/store/l6jgwxkc3jhr029vfzfwzcy28iyckwsj-coreutils-9.1/bin/mkdir: cannot create directory ‘/nix/store/c0prxmlyhzsgjxv0y52w002aw06bi34k-hello’: Read-only file system
make[3]: *** [Makefile:1554: install-binPROGRAMS] Error 1
make[3]: Leaving directory ‘/home/andrew/nix_pills/testing/hello-2.10’
make[2]: *** [Makefile:2377: install-am] Error 2
make[2]: Leaving directory ‘/home/andrew/nix_pills/testing/hello-2.10’
make[1]: *** [Makefile:1878: install-recursive] Error 1
make[1]: Leaving directory ‘/home/andrew/nix_pills/testing/hello-2.10’
make: *** [Makefile:2371: install] Error 2

My expectation would be that I would still be in the nix-shell and that I woiuld just cd into the hello folder and make the program.

But instead I am dropped out of nix-shell and back to my standard shell. This means that i need to reopen, source $setup go to the folder and make.

Why am I being dropped out of the nix-shell? Is this expected? I would have thought after the make error I would still be in the nix-shell and be able to just cd to hello and then run make?