diff options
Diffstat (limited to 'pkgs/games/build-support/build-sandbox/src/get-closure.cc')
-rw-r--r-- | pkgs/games/build-support/build-sandbox/src/get-closure.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/games/build-support/build-sandbox/src/get-closure.cc b/pkgs/games/build-support/build-sandbox/src/get-closure.cc new file mode 100644 index 00000000..11330a9c --- /dev/null +++ b/pkgs/games/build-support/build-sandbox/src/get-closure.cc @@ -0,0 +1,23 @@ +#include <nix/util.hh> +#include <nix/local-store.hh> +#include <nix/store-api.hh> +#include <nix/misc.hh> + +using namespace nix; + +int get_closure(const char *path) +{ + Path query(path); + PathSet paths; + auto store = openStore(false); + + computeFSClosure( + *store, followLinksToStorePath(query), paths, false, true + ); + + for (auto i = paths.begin(); i != paths.end(); ++i) { + // TODO! + } + + return 1; +} |