aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.md
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-12-13 19:14:32 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-12-13 19:14:32 +0100
commit2567b74c66ed52f752578373d4ec81ac2f09d6f0 (patch)
tree921525fbc6cbd960a1e898b643e15bdda2c0281b /src/nix/run.md
parent775bdc0d9e872831f4faeed1d05ab13dac232d39 (diff)
nix run: Tweak docs
Diffstat (limited to 'src/nix/run.md')
-rw-r--r--src/nix/run.md14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/nix/run.md b/src/nix/run.md
index 697db9a96..cd3b978c0 100644
--- a/src/nix/run.md
+++ b/src/nix/run.md
@@ -43,11 +43,15 @@ program specified by the app definition.
If *installable* evaluates to a derivation, it will try to execute the
program `<out>/bin/<name>`, where *out* is the primary output store
-path of the derivation and *name* is the `meta.mainProgram` attribute
-of the derivation if it exists, and otherwise the `pname` attribute of
-the derivation or the name part of the value of the `name` attribute of
-the derivation (e.g. if `name` is set to `hello-1.10`, it will run
-`$out/bin/hello`).
+path of the derivation, and *name* is the first of the following that
+exists:
+
+* The `meta.mainProgram` attribute of the derivation.
+* The `pname` attribute of the derivation.
+* The name part of the value of the `name` attribute of the derivation.
+
+For instance, if `name` is set to `hello-1.10`, `nix run` will run
+`$out/bin/hello`.
# Flake output attributes