I’m currently using channels on my system, and would like to switch to something like npins to better manage nixpkgs and other channel versions. As I understand it, the update flow is like this:
npins update—updatessources.json- Rebuild
- Revert
sources.jsonif build fails
The trouble is, the rebuild step can take quite a while. (For both the system configuration and various dev shells, I often have patches applied, either to packages or to nixpkgs itself, which means a rebuild after a channel update can take a long time and result in lots of compiling.) During this time, I may find I need to add a new package to the environment, and I’m stuck until the rebuild completes. What I’d like to be able to do is add the package and rebuild the environment using the channel versions in the current generation (fast, since the new package is the only change) while the build using the new versions proceeds in another tab.
Basically, I’d like the flow to look something like this (handwavy, using made up npins subcommands):
npins stage—Likenpins update, but saves the new versions in a staging file (never checked in to source control)- Somehow kick off a build using the staged versions.
- While that’s running, add a package to *.nix file.
- Rebuild and switch with current versions to quickly add the package to environment.
- When (2) completes,
npins apply-staged - Rebuild and switch to new versions (fast, because the new derivations have already been built).
Has anyone created a workflow like this? Is there a way to accomplish it using existing tools?
Thanks!