mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Support sandbox builds by non-root users
This allows an unprivileged user to perform builds on a diverted store (i.e. where the physical store location differs from the logical location). Example: $ NIX_LOG_DIR=/tmp/log NIX_REMOTE="local?real=/tmp/store&state=/tmp/var" nix-build -E \ 'with import <nixpkgs> {}; runCommand "foo" { buildInputs = [procps nettools]; } "id; ps; ifconfig; echo $out > $out"' will do a build in the Nix store physically in /tmp/store but logically in /nix/store (and thus using substituters for the latter).
This commit is contained in:
parent
2f8b0e557b
commit
5e51ffb1c2
3 changed files with 69 additions and 53 deletions
|
@ -39,6 +39,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
// FIXME: not thread-safe!
|
||||
bool pathIsLockedByMe(const Path & path);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue