about summary refs log tree commit diff
path: root/pkgs/games/build-support/build-sandbox/src/nix-query.cc
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-10-03 23:13:48 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-10-03 23:41:46 +0200
commitaf1c840c1cf7f471ea2097148bc0e15dd0c2813b (patch)
treeea4fbe3db92af607774f326039156dc9c01cedbc /pkgs/games/build-support/build-sandbox/src/nix-query.cc
parent175e9328bf9d403c70a0fd3721d1839538558422 (diff)
pkgs/sandbox: Mount closure of /etc/static
We already mount /etc, but it isn't quite enough, because it contains
files symlinked to /etc/static, which in turn is a store path so we need
to mount the closure of that path as well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/games/build-support/build-sandbox/src/nix-query.cc')
-rw-r--r--pkgs/games/build-support/build-sandbox/src/nix-query.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/games/build-support/build-sandbox/src/nix-query.cc b/pkgs/games/build-support/build-sandbox/src/nix-query.cc
index 128c376a..71208693 100644
--- a/pkgs/games/build-support/build-sandbox/src/nix-query.cc
+++ b/pkgs/games/build-support/build-sandbox/src/nix-query.cc
@@ -56,11 +56,12 @@ static Path get_ancestor(query_state *qs, Path path)
         }
     }
 
-    return path;
+    return get_store_path(qs, path);
 }
 
 extern "C" {
-    struct query_state *new_query(void) {
+    struct query_state *new_query(void)
+    {
         query_state *initial = new query_state();
 #if NIX_VERSION >= 112
         initial->store = openStore();
@@ -72,7 +73,8 @@ extern "C" {
         return initial;
     }
 
-    void free_query(query_state *qs) {
+    void free_query(query_state *qs)
+    {
         delete qs;
     }