Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildPythonApplication,
nix-update-script,
fetchFromGitHub,
dnspython,
iproute2,
iptables,
setproctitle,
setuptools,
unixtools,
}:
buildPythonApplication rec {
pname = "vpn-slice";
version = "0.16.1";
pyproject = true;
src = fetchFromGitHub {
owner = "dlenski";
repo = "vpn-slice";
rev = "v${version}";
sha256 = "sha256-T6VULLNRLWO4OcAsuTmhty6H4EhinyxQSg0dfv2DUJs=";
};
postPatch =
lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace vpn_slice/mac.py \
--replace-fail "'/sbin/route'" "'${unixtools.route}/bin/route'"
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace vpn_slice/linux.py \
--replace-fail "'/sbin/ip'" "'${iproute2}/bin/ip'" \
--replace-fail "'/sbin/iptables'" "'${iptables}/bin/iptables'"
'';
build-system = [
setuptools
];
dependencies = [
setuptools # can be removed with next package update, upstream no longer has a dependency on distutils
setproctitle
dnspython
];
doCheck = false;
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
homepage = "https://github.com/dlenski/vpn-slice";
description = "vpnc-script replacement for easy and secure split-tunnel VPN setup";
mainProgram = "vpn-slice";
license = licenses.gpl3;
maintainers = [ ];
};
}