mirror of
https://github.com/NixOS/nix
synced 2025-07-10 08:53:55 +02:00
libstore: check additionalSandboxProfile
Make sure that `extraSandboxProfile` is set before we check whether it's empty or not (in the `sandbox=true` case). Also adds a test case for this. Co-Authored-By: Artemis Tosini <lix@artem.ist> Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
20445dfeaf
commit
9bd1191fcc
4 changed files with 47 additions and 4 deletions
19
tests/functional/extra-sandbox-profile.nix
Normal file
19
tests/functional/extra-sandbox-profile.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ destFile, seed }:
|
||||
|
||||
with import ./config.nix;
|
||||
|
||||
mkDerivation {
|
||||
name = "simple";
|
||||
__sandboxProfile = ''
|
||||
# Allow writing any file in the filesystem
|
||||
(allow file*)
|
||||
'';
|
||||
inherit seed;
|
||||
buildCommand = ''
|
||||
(
|
||||
set -x
|
||||
touch ${destFile}
|
||||
touch $out
|
||||
)
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue