diff options
author | aszlig <aszlig@nix.build> | 2018-07-22 07:04:55 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-07-22 07:04:55 +0200 |
commit | db25b6ad5a9abf3c3edd34d980d9ec32604eead7 (patch) | |
tree | 846d1dad9b0159ddfb82425eba58c96289492b49 /tests/default.nix | |
parent | c5e28ba680458cdf094839969a7009eb05d3fb41 (diff) |
pkgs/sandbox: Support overlaying files at runtime
This introduces a new environment variable called NIX_SANDBOX_DEBUG_INJECT_FILES. The name is intentionally very long so that people hopefully *only* use it for debugging. What this does is to just bind-mount the given source file to a given destination file in the chroot. For example: NIX_SANDBOX_DEBUG_INJECT_FILES=/foo/bar=/bar/foo somethingSandboxed The file /foo/bar outside of the sandbox will be bind-mounted to /bar/foo within the sandbox. Several files can be separated via colon. Of course the most interesting use case here (and the reason for this feature) is that we can overlay files in the Nix store without the need to rebuild anything, so we can quickly patch specific files. In my case I'm using this so I can use radare2 to patch the assembly of some binaries quickly for debugging/reverse engineering. Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'tests/default.nix')
0 files changed, 0 insertions, 0 deletions