From c82d21271656400f5e87e0baf46e61224fe1aaa9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 28 Sep 2017 21:29:58 +0200 Subject: pkgs/sandbox: Include basic runtime paths These paths are things such as /etc and /run but also the .Xauthority file, which contains the cookie to connect to the X server. What is still missing is access to the DRI libraries, which is a bit trickier, because we need to add those store paths at runtime and we need to also mount all of the dependencies. Signed-off-by: aszlig --- pkgs/games/build-support/build-sandbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/games/build-support/build-sandbox/default.nix') diff --git a/pkgs/games/build-support/build-sandbox/default.nix b/pkgs/games/build-support/build-sandbox/default.nix index 615f5358..2b45f3e5 100644 --- a/pkgs/games/build-support/build-sandbox/default.nix +++ b/pkgs/games/build-support/build-sandbox/default.nix @@ -33,10 +33,10 @@ stdenv.mkDerivation ({ echo 'static bool setup_app_paths(void) {' > params.c for dep in $runtimeDeps; do - echo 'if (!bind_mount("'"$dep"'", true)) return false;' >> params.c + echo 'if (!bind_mount("'"$dep"'", true, true)) return false;' >> params.c done - ${lib.concatMapStrings (extra: let + ${lib.concatMapStringsSep "\n" (extra: let escaped = lib.escapeShellArg (lib.escape ["\\" "\""] extra); result = "echo 'if (!extra_mount(\"'${escaped}'\")) return false;'"; in "${result} >> params.c") extraSandboxPaths} -- cgit 1.4.1