Hi all
Looking at the Wiki (ex: nix develop - Nix 2.28.5 Reference Manual) in particular these statements:
Record a build environment in a profile:
$ nix develop --profile /tmp/my-build-env nixpkgs#hello
Use a build environment previously recorded in a profile:
$ nix develop /tmp/my-build-env
my understanding is that we should be able to build+enter shell with the first command, and store the shell “dump” into the profile; and my understanding of the second part is that we could “load” the shell (immediately, without “rebuilding” it) by launching the second command.
Also in some places it seems to confirm what I’m expecting from “nix develop” (ex: How are you keeping devshell dependencies live in store? - #5 by edolstra)
However, that doesn’t seem to be the case: when I run the second command, nix hangs building something (but I don’t know what).
In very verbose mode, here are the first lines of what nix develop does:
$ cat /nix/store/23sjim3h7njh5ijzaadnlkrci6blw1sc-my-build-env
{
“bashFunctions”: {
“_activatePkgs”:" \n local …$ nix develop -vvv /nix/store/23sjim3h7njh5ijzaadnlkrci6blw1sc-my-build-env
evaluating file ‘<nix/derivation-internal.nix>’
evaluating derivation ‘flake:nixpkgs#bashInteractive’
And so, nix start downloading nixpkgs rev etc…
Am I misunderstanding the “nix develop ” behavior ?
Note: I’m using “nix (Nix) 2.28.3”
Thanks all for any feedback