diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/tools/networking/vpn-slice/default.nix | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/tools/networking/vpn-slice/default.nix')
-rw-r--r-- | pkgs/tools/networking/vpn-slice/default.nix | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/pkgs/tools/networking/vpn-slice/default.nix b/pkgs/tools/networking/vpn-slice/default.nix index 3d883dca5b1..75cfe2bba0e 100644 --- a/pkgs/tools/networking/vpn-slice/default.nix +++ b/pkgs/tools/networking/vpn-slice/default.nix @@ -1,4 +1,13 @@ -{ lib, buildPythonApplication, nix-update-script, python3Packages, fetchFromGitHub }: +{ lib +, stdenv +, buildPythonApplication +, nix-update-script +, python3Packages +, fetchFromGitHub +, iproute2 +, iptables +, unixtools +}: buildPythonApplication rec { pname = "vpn-slice"; @@ -11,6 +20,15 @@ buildPythonApplication rec { sha256 = "sha256-T6VULLNRLWO4OcAsuTmhty6H4EhinyxQSg0dfv2DUJs="; }; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace vpn_slice/mac.py \ + --replace "'/sbin/route'" "'${unixtools.route}/bin/route'" + '' + lib.optionalString stdenv.isLinux '' + substituteInPlace vpn_slice/linux.py \ + --replace "'/sbin/ip'" "'${iproute2}/bin/ip'" \ + --replace "'/sbin/iptables'" "'${iptables}/bin/iptables'" + ''; + propagatedBuildInputs = with python3Packages; [ setproctitle dnspython ]; doCheck = false; @@ -24,6 +42,6 @@ buildPythonApplication rec { description = "vpnc-script replacement for easy and secure split-tunnel VPN setup"; license = licenses.gpl3; - maintainers = with maintainers; [ jdbaldry ]; + maintainers = with maintainers; [ liketechnik ]; }; } |