2016-01-17 20:45:43 +00:00
|
|
|
{ stdenv, pythonPackages, fetchurl, makeWrapper, pandoc
|
2016-01-09 17:08:43 +00:00
|
|
|
, coreutils, iptables, nettools, openssh, procps }:
|
2013-10-05 15:45:51 +01:00
|
|
|
|
2016-01-09 17:08:43 +00:00
|
|
|
pythonPackages.buildPythonPackage rec {
|
2016-01-17 20:45:43 +00:00
|
|
|
version = "0.76";
|
2013-10-05 15:45:51 +01:00
|
|
|
name = "sshuttle-${version}";
|
|
|
|
|
2016-01-17 20:45:43 +00:00
|
|
|
src = fetchurl {
|
|
|
|
sha256 = "1q0hr0vhdvv23cw5dqndsmf61283mvs6b14662ci00xj6zp5v48b";
|
|
|
|
url = "https://pypi.python.org/packages/source/s/sshuttle/${name}.tar.gz";
|
2013-10-05 15:45:51 +01:00
|
|
|
};
|
|
|
|
|
2016-01-09 17:08:43 +00:00
|
|
|
patches = [ ./sudo.patch ];
|
2015-09-24 00:32:25 +01:00
|
|
|
|
2016-01-09 17:08:43 +00:00
|
|
|
propagatedBuildInputs = with pythonPackages; [ PyXAPI mock pytest ];
|
2016-01-17 20:45:43 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pandoc pythonPackages.setuptools_scm ];
|
2015-09-24 08:44:10 +01:00
|
|
|
buildInputs =
|
2016-01-09 17:08:43 +00:00
|
|
|
[ coreutils openssh ] ++
|
|
|
|
stdenv.lib.optionals stdenv.isLinux [ iptables nettools procps ];
|
2013-10-05 15:45:51 +01:00
|
|
|
|
2016-01-09 17:08:43 +00:00
|
|
|
postInstall = let
|
2015-09-24 08:44:10 +01:00
|
|
|
mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x);
|
|
|
|
in ''
|
2016-01-09 17:08:43 +00:00
|
|
|
wrapProgram $out/bin/sshuttle \
|
|
|
|
--prefix PATH : "${mapPath (x: "${x}/bin") buildInputs}" \
|
2013-10-05 15:45:51 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-09-23 11:19:24 +01:00
|
|
|
inherit version;
|
2016-01-17 20:45:43 +00: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
|
|
|
|
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 ];
|
2013-10-05 15:45:51 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|