mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #261216 from liketechnik/vpn-slice-add-iproute2-iptables
vpn-slice: add iproute2,iptables to propagatedBuildInputs
This commit is contained in:
commit
f4d81e367f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user