Skip to content

Commit 7448aed

Browse files
authored
Merge pull request #14745 from NixOS/fix-build-dir-docs
Correct `build-dir` error in manual, link relevant settings
2 parents 19db567 + c5fa5e5 commit 7448aed

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

doc/manual/source/store/building.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212

1313
The [`builder`](./derivation/index.md#builder) is executed as follows:
1414

15-
- A temporary directory is created under the directory specified by
16-
`TMPDIR` (default `/tmp`) where the build will take place. The
15+
- A temporary directory is created where the build will take place. The
1716
current directory is changed to this directory.
1817

18+
See the per-store [`build-dir`](@docroot@/store/types/local-store.md#store-local-store-build-dir) setting for more information.
19+
1920
- The environment is cleared and set to the derivation attributes, as
2021
specified above.
2122

src/libstore/include/nix/store/globals.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ public:
794794
"build-dir",
795795
R"(
796796
Override the `build-dir` store setting for all stores that have this setting.
797+
798+
See also the per-store [`build-dir`](@docroot@/store/types/local-store.md#store-local-store-build-dir) setting.
797799
)"};
798800

799801
Setting<PathSet> allowedImpureHostPrefixes{

src/libstore/include/nix/store/local-store.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ private:
6161
> `build-dir` must not be set to a world-writable directory.
6262
> Placing temporary build directories in a world-writable place allows other users to access or modify build data that is currently in use.
6363
> This alone is merely an impurity, but combined with another factor this has allowed malicious derivations to escape the build sandbox.
64+
65+
See also the global [`build-dir`](@docroot@/command-ref/conf-file.md#conf-build-dir) setting.
6466
)"};
6567
public:
6668
Path getBuildDir() const;

0 commit comments

Comments
 (0)