]>
Commit | Line | Data |
---|---|---|
b40df7e8 SW |
1 | nix-pin-deps: GC-anchor a Nix build's dependencies |
2 | -------------------------------------------------- | |
3 | ||
4 | When a Nix build fails for lack of disk space and a `nix-collect-garbage` | |
5 | is needed to make disk space available, `nix-collect-garbage` will | |
6 | unhelpfully delete the successfully-built dependencies of the derivation | |
7 | that failed because they are are not yet gc-anchored, because the | |
8 | build failed. | |
9 | ||
10 | This tool solves this problem: | |
11 | ||
12 | `nix-pin-deps /nix/store/...-foo.drv foo-deps` | |
13 | ||
14 | will create gc-anchors in foo-deps/ for all of the dependencies of foo.drv | |
15 | that exist in the nix store, keeping partial build progress safe from | |
16 | `nix-collect-garbage`. |