]> git.scottworley.com Git - nix-pin-deps/commitdiff
README: Explain what this is for v1.0.0
authorScott Worley <scottworley@scottworley.com>
Fri, 20 May 2022 21:47:01 +0000 (14:47 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 20 May 2022 21:47:01 +0000 (14:47 -0700)
README.md [new file with mode: 0644]

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..53067f5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+nix-pin-deps: GC-anchor a Nix build's dependencies
+--------------------------------------------------
+
+When a Nix build fails for lack of disk space and a `nix-collect-garbage`
+is needed to make disk space available, `nix-collect-garbage` will
+unhelpfully delete the successfully-built dependencies of the derivation
+that failed because they are are not yet gc-anchored, because the
+build failed.
+
+This tool solves this problem:
+
+  `nix-pin-deps /nix/store/...-foo.drv foo-deps`
+
+will create gc-anchors in foo-deps/ for all of the dependencies of foo.drv
+that exist in the nix store, keeping partial build progress safe from
+`nix-collect-garbage`.