aboutsummaryrefslogtreecommitdiff
path: root/src/nix/log.md
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2021-04-27 12:31:01 -0600
committerBen Burdette <bburdette@gmail.com>2021-04-27 12:31:01 -0600
commitb466d5195227ca1ce3932e8c0fef0bd5ff8334b1 (patch)
tree1159035cde18824ee1c9ef5c45d4159ee2134c8b /src/nix/log.md
parente486996cef871337ef14991e709d7f2cc6611e4e (diff)
parente3e78ee2a2706745531ccf1a98729df59e7b295f (diff)
Merge branch 'master' into debugger-merge
Diffstat (limited to 'src/nix/log.md')
-rw-r--r--src/nix/log.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/nix/log.md b/src/nix/log.md
new file mode 100644
index 000000000..1c76226a3
--- /dev/null
+++ b/src/nix/log.md
@@ -0,0 +1,40 @@
+R""(
+
+# Examples
+
+* Get the build log of GNU Hello:
+
+ ```console
+ # nix log nixpkgs#hello
+ ```
+
+* Get the build log of a specific store path:
+
+ ```console
+ # nix log /nix/store/lmngj4wcm9rkv3w4dfhzhcyij3195hiq-thunderbird-52.2.1
+ ```
+
+* Get a build log from a specific binary cache:
+
+ ```console
+ # nix log --store https://cache.nixos.org nixpkgs#hello
+ ```
+
+# Description
+
+This command prints the log of a previous build of the derivation
+*installable* on standard output.
+
+Nix looks for build logs in two places:
+
+* In the directory `/nix/var/log/nix/drvs`, which contains logs for
+ locally built derivations.
+
+* In the binary caches listed in the `substituters` setting. Logs
+ should be named `<cache>/log/<base-name-of-store-path>`, where
+ `store-path` is a derivation,
+ e.g. `https://cache.nixos.org/log/dvmig8jgrdapvbyxb1rprckdmdqx08kv-hello-2.10.drv`.
+ For non-derivation store paths, Nix will first try to determine the
+ deriver by fetching the `.narinfo` file for this store path.
+
+)""