I have some nix shells for python with tensorflow, openCV, CUDA. It takes ages to build. I like keeping my system up to date so I update channels often, but unlike nix-shell, that doesn’t stop me from using previous versions of software until build is completed (or often deferred to be done over night).
I might have updated the system days before and only next time I want to urgently use my shell I end up waiting for hours to get back my development environment…
Cannot find how to use cached version of the shell anywhere or to stop it from updating in any way.
Could someone advise how I should organise my work to avoid that issue?
@rofrol I think this page isn’t explanatory enough for me. It doesn’t explain how nix-instantiate can be used with shell apart form one example command that doesn’t really work for me, $ nix-instantiate shell.nix --indirect --add-root ./.nix-gc-roots/shell.drv ... is looking for a file default.nix which isn’t relevant I believe.
I tried running what I understood should create build outputs in a directory not to be garbage collected: nix-instantiate tf-shell-new.nix --indirect --add-root ./shellbuilds
However on running nix-shell tf-shell-new.nix it still gets any new packages.
I know that I can pin the shell to specific git revision of nixos, but this is not what I’m looking for.