aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/develop.cc6
-rw-r--r--src/nix/develop.md2
-rw-r--r--src/nix/eval.cc2
-rw-r--r--src/nix/flake.md6
-rw-r--r--src/nix/nix.md2
-rw-r--r--src/nix/prefetch.cc2
-rw-r--r--src/nix/realisation/info.md2
-rw-r--r--src/nix/repl.cc2
8 files changed, 16 insertions, 8 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index a8ca1cac2..42e13436a 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -472,9 +472,11 @@ struct CmdDevelop : Common, MixEnvironment
else {
script = "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;\n" + script;
if (developSettings.bashPrompt != "")
- script += fmt("[ -n \"$PS1\" ] && PS1=%s;\n", shellEscape(developSettings.bashPrompt));
+ script += fmt("[ -n \"$PS1\" ] && PS1=%s;\n",
+ shellEscape(developSettings.bashPrompt.get()));
if (developSettings.bashPromptSuffix != "")
- script += fmt("[ -n \"$PS1\" ] && PS1+=%s;\n", shellEscape(developSettings.bashPromptSuffix));
+ script += fmt("[ -n \"$PS1\" ] && PS1+=%s;\n",
+ shellEscape(developSettings.bashPromptSuffix.get()));
}
writeFull(rcFileFd.get(), script);
diff --git a/src/nix/develop.md b/src/nix/develop.md
index 1f214966a..3e7e339d5 100644
--- a/src/nix/develop.md
+++ b/src/nix/develop.md
@@ -55,7 +55,7 @@ R""(
# nix develop /tmp/my-build-env
```
-* Replace all occurences of the store path corresponding to
+* Replace all occurrences of the store path corresponding to
`glibc.dev` with a writable directory:
```console
diff --git a/src/nix/eval.cc b/src/nix/eval.cc
index c7517cf79..c0435461f 100644
--- a/src/nix/eval.cc
+++ b/src/nix/eval.cc
@@ -107,7 +107,7 @@ struct CmdEval : MixJSON, InstallableCommand
else if (raw) {
stopProgressBar();
- std::cout << state->coerceToString(noPos, *v, context);
+ std::cout << *state->coerceToString(noPos, *v, context);
}
else if (json) {
diff --git a/src/nix/flake.md b/src/nix/flake.md
index a8436bcaa..accddd436 100644
--- a/src/nix/flake.md
+++ b/src/nix/flake.md
@@ -292,6 +292,12 @@ The following attributes are supported in `flake.nix`:
value (e.g. `packages.x86_64-linux` must be an attribute set of
derivations built for the `x86_64-linux` platform).
+* `nixConfig`: a set of `nix.conf` options to be set when evaluating any
+ part of a flake. In the interests of security, only a small set of
+ whitelisted options (currently `bash-prompt`, `bash-prompt-suffix`,
+ and `flake-registry`) are allowed to be set without confirmation so long as
+ `accept-flake-config` is not set in the global configuration.
+
## Flake inputs
The attribute `inputs` specifies the dependencies of a flake, as an
diff --git a/src/nix/nix.md b/src/nix/nix.md
index 2f54c5e2c..1dc59362d 100644
--- a/src/nix/nix.md
+++ b/src/nix/nix.md
@@ -76,7 +76,7 @@ the Nix store. Here are the recognised types of installables:
Note that the search will only include files indexed by git. In particular, files
which are matched by `.gitignore` or have never been `git add`-ed will not be
- available in the flake. If this is undesireable, specify `path:<directory>` explicitly;
+ available in the flake. If this is undesirable, specify `path:<directory>` explicitly;
For example, if `/foo/bar` is a git repository with the following structure:
```
diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc
index 768d37595..669be0709 100644
--- a/src/nix/prefetch.cc
+++ b/src/nix/prefetch.cc
@@ -38,7 +38,7 @@ string resolveMirrorUrl(EvalState & state, string url)
if (mirrorList->value->listSize() < 1)
throw Error("mirror URL '%s' did not expand to anything", url);
- auto mirror = state.forceString(*mirrorList->value->listElems()[0]);
+ string mirror(state.forceString(*mirrorList->value->listElems()[0]));
return mirror + (hasSuffix(mirror, "/") ? "" : "/") + string(s, p + 1);
}
diff --git a/src/nix/realisation/info.md b/src/nix/realisation/info.md
index 852240f44..8aa986516 100644
--- a/src/nix/realisation/info.md
+++ b/src/nix/realisation/info.md
@@ -1,7 +1,7 @@
R"MdBoundary(
# Description
-Display some informations about the given realisation
+Display some information about the given realisation
# Examples
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index be9f96836..2d983e98e 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -463,7 +463,7 @@ bool NixRepl::processLine(string line)
if (v.type() == nPath || v.type() == nString) {
PathSet context;
auto filename = state->coerceToString(noPos, v, context);
- pos.file = state->symbols.create(filename);
+ pos.file = state->symbols.create(*filename);
} else if (v.isLambda()) {
pos = v.lambda.fun->pos;
} else {