blob: b78eb43782edb18bd4a5b952b8bf968cd087c27e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ stdenv, pythonPackages, fetchurl, makeWrapper, pandoc
, coreutils, iptables, nettools, openssh, procps }:
pythonPackages.buildPythonApplication rec {
name = "sshuttle-${version}";
version = "0.76";
src = fetchurl {
sha256 = "1q0hr0vhdvv23cw5dqndsmf61283mvs6b14662ci00xj6zp5v48b";
url = "https://pypi.python.org/packages/source/s/sshuttle/${name}.tar.gz";
};
patches = [ ./sudo.patch ];
propagatedBuildInputs = with pythonPackages; [ PyXAPI mock pytest ];
nativeBuildInputs = [ makeWrapper pandoc pythonPackages.setuptools_scm ];
buildInputs =
[ coreutils openssh ] ++
stdenv.lib.optionals stdenv.isLinux [ iptables nettools procps ];
postInstall = let
mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x);
in ''
wrapProgram $out/bin/sshuttle \
--prefix PATH : "${mapPath (x: "${x}/bin") buildInputs}" \
'';
meta = with stdenv.lib; {
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 at both ends).
Works with Linux and Mac OS and supports DNS tunneling.
'';
maintainers = with maintainers; [ iElectric nckx ];
platforms = platforms.unix;
};
}
|