You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First thank you for this project. It completely removes the slowdown seen with nix-shell scripts so I'm relying on it a lot these days.
One issue I'm experiencing however is that the cache gets invalidated by nix-collect-garbage.
To avoid this I'm using nix-instantiate inside the script to pin (some of) the packages used.
A typical script looks like:
#!/usr/bin/env cached-nix-shell
#!nix-shell -i bash -p bash packageA packageB
nix-instantiate '<nixpkgs>' -A bash -A packageA -A packageB --indirect --add-root "$HOME/nix/pins/packageAB.drv"
(...)
However, this has the downside that for some packages nix-instantiate also takes some time to execute which removes some of the benefit of using cached-nix-shell.
Is there any way to pin the same packages that were used by the shell without this nix-instantiate hack?
Thanks
The text was updated successfully, but these errors were encountered:
Hi everyone,
First thank you for this project. It completely removes the slowdown seen with nix-shell scripts so I'm relying on it a lot these days.
One issue I'm experiencing however is that the cache gets invalidated by
nix-collect-garbage
.To avoid this I'm using
nix-instantiate
inside the script to pin (some of) the packages used.A typical script looks like:
However, this has the downside that for some packages
nix-instantiate
also takes some time to execute which removes some of the benefit of usingcached-nix-shell
.Is there any way to pin the same packages that were used by the shell without this
nix-instantiate
hack?Thanks
The text was updated successfully, but these errors were encountered: