netns-exec: add c program to execute commands in netns

c program allows executing commands in nb-bitcoind, nb-lnd, nb-liquidd
(the netns's needed for operator cli scripts).
This commit is contained in:
Jonas Nick
2020-06-18 10:21:55 +00:00
committed by nixbitcoin
parent 5bb9aa5d6d
commit 4a7199a3da
4 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{ stdenv, pkgs }:
stdenv.mkDerivation {
name = "netns-exec";
buildInputs = [ pkgs.libcap ];
src = ./src;
installPhase = ''
mkdir -p $out
cp main $out/netns-exec
'';
}