1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-18 07:08:27 +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>
(cherry picked from commit 9bd1191fcc)
This commit is contained in:
Théophane Hufschmitt 2024-05-06 15:10:18 +02:00 committed by Valentin Gagarin
parent 9f526847e4
commit 1524ad38d2
3 changed files with 46 additions and 4 deletions

View 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
)
'';
}