2021-07-17 22:03:01 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-07-08 01:54:40 +01:00
|
|
|
, python3Packages
|
|
|
|
, makeWrapper
|
|
|
|
, coreutils
|
|
|
|
, iptables
|
|
|
|
, nettools
|
|
|
|
, openssh
|
|
|
|
, procps
|
|
|
|
}:
|
2017-09-26 07:16:14 +01:00
|
|
|
|
2017-07-09 08:59:08 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-03-29 11:34:50 +01:00
|
|
|
pname = "sshuttle";
|
2022-03-28 11:29:40 +01:00
|
|
|
version = "1.1.0";
|
2013-10-05 15:45:51 +01:00
|
|
|
|
2020-03-29 11:34:50 +01:00
|
|
|
src = python3Packages.fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-28 11:29:40 +01:00
|
|
|
sha256 = "sha256-IfuRvfOStQ5422uNdelbc6ydr9Nh4mV+eE5nRWEhkxU=";
|
2013-10-05 15:45:51 +01:00
|
|
|
};
|
|
|
|
|
2018-08-30 10:11:33 +01:00
|
|
|
patches = [ ./sudo.patch ];
|
2015-09-24 00:32:25 +01:00
|
|
|
|
2021-07-17 22:03:01 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace '--cov=sshuttle --cov-branch --cov-report=term-missing' ""
|
|
|
|
'';
|
2013-10-05 15:45:51 +01:00
|
|
|
|
2021-07-17 22:03:01 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper python3Packages.setuptools-scm ];
|
2017-07-09 08:59:08 +01:00
|
|
|
|
2022-03-28 11:29:40 +01:00
|
|
|
checkInputs = with python3Packages; [ pytestCheckHook ];
|
2020-07-08 01:54:40 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/sshuttle \
|
2021-07-17 22:03:01 +01:00
|
|
|
--prefix PATH : "${lib.makeBinPath ([ coreutils openssh procps ] ++ lib.optionals stdenv.isLinux [ iptables nettools ])}" \
|
2013-10-05 15:45:51 +01:00
|
|
|
'';
|
2017-09-26 07:16:14 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/sshuttle/sshuttle/";
|
2013-10-05 15:45:51 +01:00
|
|
|
description = "Transparent proxy server that works as a poor man's VPN";
|
2015-09-23 11:19:24 +01:00
|
|
|
longDescription = ''
|
|
|
|
Forward connections over SSH, without requiring administrator access to the
|
2019-03-06 00:37:33 +00:00
|
|
|
target network (though it does require Python 2.7, Python 3.5 or later at both ends).
|
2015-09-23 11:19:24 +01:00
|
|
|
Works with Linux and Mac OS and supports DNS tunneling.
|
|
|
|
'';
|
2021-07-17 19:54:41 +01:00
|
|
|
license = licenses.lgpl21;
|
2022-03-28 11:29:40 +01:00
|
|
|
maintainers = with maintainers; [ domenkozar carlosdagos SuperSandro2000 ];
|
2013-10-05 15:45:51 +01:00
|
|
|
};
|
|
|
|
}
|