You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If set to true, [`builtins.warn`](@docroot@/language/builtins.md#builtins-warn) will throw an error when logging a warning.
250
+
If set to true, [`builtins.warn`](@docroot@/language/builtins.md#builtins-warn) throws an error when logging a warning.
251
251
252
-
This will give you a stack trace that leads to the location of the warning.
252
+
This gives you a stack trace that leads to the location of the warning.
253
253
254
254
This is useful for finding information about warnings in third-party Nix code when you can not start the interactive debugger, such as when Nix is called from a non-interactive script. See [`debugger-on-warn`](#conf-debugger-on-warn).
Try to shallowly evaluate *e*. Return a set containing the
1024
1024
attributes `success` (`true` if *e* evaluated successfully,
1025
1025
`false` if an error was thrown) and `value`, equalling *e* if
1026
-
successful and `false` otherwise. `tryEval` will only prevent
1026
+
successful and `false` otherwise. `tryEval` only prevents
1027
1027
errors created by `throw` or `assert` from being thrown.
1028
-
Errors `tryEval` will not catch are for example those created
1028
+
Errors that `tryEval` doesn't catch are, for example, those created
1029
1029
by `abort` and type errors generated by builtins. Also note that
1030
1030
this doesn't evaluate *e* deeply, so `let e = { x = throw ""; };
1031
-
in (builtins.tryEval e).success` will be `true`. Using
1031
+
in (builtins.tryEval e).success` is `true`. Using
1032
1032
`builtins.deepSeq` one can get the expected result:
1033
1033
`let e = { x = throw ""; }; in
1034
-
(builtins.tryEval (builtins.deepSeq e e)).success` will be
1034
+
(builtins.tryEval (builtins.deepSeq e e)).success` is
1035
1035
`false`.
1036
1036
1037
1037
`tryEval` intentionally does not return the error message, because that risks bringing non-determinism into the evaluation result, and it would become very difficult to improve error reporting without breaking existing expressions.
After this, the *base name* is returned as previously described, assuming `/` as the directory separator. (Note that evaluation must be platform independent.)
1837
1837
1838
-
This is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` will strip any number of trailing slashes.
1838
+
This is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` strips any number of trailing slashes.
> and a *lookup-path* value `"nixos-config"` will cause Nix to try `/home/eelco/Dev/nixos-config` and `/etc/nixos` in that order and return the first path that exists.
2037
+
> and a *lookup-path* value `"nixos-config"` causes Nix to try `/home/eelco/Dev/nixos-config` and `/etc/nixos` in that order and return the first path that exists.
2038
2038
2039
-
If `path` starts with `http://` or `https://`, it is interpreted as the URL of a tarball that will be downloaded and unpacked to a temporary location.
2039
+
If `path` starts with `http://` or `https://`, it is interpreted as the URL of a tarball to be downloaded and unpacked to a temporary location.
2040
2040
The tarball must consist of a single top-level directory.
2041
2041
2042
2042
The URLs of the tarballs from the official `nixos.org` channels can be abbreviated as `channel:<channel-name>`.
If the derivation has a statically-known output path (i.e. the derivation output is input-addressed, or fixed content-addresed), the output path will just be returned.
2222
-
But if the derivation is content-addressed or if the derivation is itself not-statically produced (i.e. is the output of another derivation), an input placeholder will be returned instead.
2221
+
If the derivation has a statically-known output path (i.e. the derivation output is input-addressed, or fixed content-addresed), the output path is returned.
2222
+
But if the derivation is content-addressed or if the derivation is itself not-statically produced (i.e. is the output of another derivation), an input placeholder is returned instead.
2223
2223
2224
2224
*`derivation reference`* must be a string that may contain a regular store path to a derivation, or may be an input placeholder reference.
2225
2225
If the derivation is produced by a derivation, you must explicitly select `drv.outPath`.
will return a input placeholder for the output of the output of `myDrv`.
2235
+
returns an input placeholder for the output of the output of `myDrv`.
2236
2236
2237
2237
This primop corresponds to the `^` sigil for [deriving paths](@docroot@/glossary.md#gloss-deriving-paths), e.g. as part of installable syntax on the command line.
The [store path](@docroot@/store/store-path.md) of a derivation depending on `currentTime` will differ for each evaluation, unless both evaluate `builtins.currentTime` in the same second.
4867
+
The [store path](@docroot@/store/store-path.md) of a derivation depending on `currentTime` differs for each evaluation unless both evaluate `builtins.currentTime` in the same second.
0 commit comments