10 buildPythonPackage rec {
11 pname = "namespaced-openvpn";
15 src = fetchFromGitHub {
18 rev = "a3fa42b2d8645272cbeb6856e26a7ea9547cb7d1";
19 sha256 = "+Fdaw9EGyFGH9/DSeVJczS8gPzAOv+qn+1U20zQBBqQ=";
22 buildInputs = [ openvpn iproute2 util-linux ];
25 substituteInPlace namespaced-openvpn \
26 --replace-fail "/usr/sbin/openvpn" "${openvpn}/bin/openvpn" \
27 --replace-fail "/sbin/ip" "${iproute2}/bin/ip" \
28 --replace-fail "/usr/bin/nsenter" "${util-linux}/bin/nsenter" \
29 --replace-fail "/bin/mount" "${util-linux}/bin/mount" \
30 --replace-fail "/bin/umount" "${util-linux}/bin/umount"
32 substituteInPlace seal-unseal-gateway \
33 --replace-fail "/sbin/iptables" "${iptables}/bin/iptables"
41 cp namespaced-openvpn seal-unseal-gateway $out/bin
45 homepage = "https://github.com/slingamn/namespaced-openvpn";
46 description = "Network namespace isolation for OpenVPN tunnels";
47 license = licenses.mit;
48 maintainers = [ maintainers.lodi ];
49 platforms = platforms.linux;
50 mainProgram = "namespaced-openvpn";