2021-07-18 21:22:44 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-07-18 16:06:22 +00:00
|
|
|
, python3Packages
|
|
|
|
, makeWrapper
|
|
|
|
, coreutils
|
|
|
|
, iptables
|
|
|
|
, nettools
|
|
|
|
, openssh
|
|
|
|
, procps
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "sshuttle";
|
2021-07-21 07:28:18 +00:00
|
|
|
version = "1.0.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = python3Packages.fetchPypi {
|
|
|
|
inherit pname version;
|
2021-07-21 07:28:18 +00:00
|
|
|
sha256 = "fd8c691aac2cb80933aae7f94d9d9e271a820efc5c48e73408f1a90da426a1bd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./sudo.patch ];
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace '--cov=sshuttle --cov-branch --cov-report=term-missing' ""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper python3Packages.setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
propagatedBuildInputs = [ python3Packages.psutil ];
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
checkInputs = with python3Packages; [ mock pytestCheckHook flake8 ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/sshuttle \
|
2021-07-18 21:22:44 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath ([ coreutils openssh procps ] ++ lib.optionals stdenv.isLinux [ iptables nettools ])}" \
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/sshuttle/sshuttle/";
|
|
|
|
description = "Transparent proxy server that works as a poor man's VPN";
|
|
|
|
longDescription = ''
|
|
|
|
Forward connections over SSH, without requiring administrator access to the
|
|
|
|
target network (though it does require Python 2.7, Python 3.5 or later at both ends).
|
|
|
|
Works with Linux and Mac OS and supports DNS tunneling.
|
|
|
|
'';
|
2021-07-21 07:28:18 +00:00
|
|
|
license = licenses.lgpl21;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ domenkozar carlosdagos ];
|
|
|
|
};
|
|
|
|
}
|