2016-01-09 17:08:43 +00:00
|
|
|
{ stdenv, pythonPackages, fetchFromGitHub, makeWrapper, pandoc
|
|
|
|
, coreutils, iptables, nettools, openssh, procps }:
|
2013-10-05 15:45:51 +01:00
|
|
|
|
2016-01-09 17:08:43 +00:00
|
|
|
pythonPackages.buildPythonPackage rec {
|
|
|
|
version = "0.74";
|
2013-10-05 15:45:51 +01:00
|
|
|
name = "sshuttle-${version}";
|
|
|
|
|
2015-09-23 11:19:24 +01:00
|
|
|
src = fetchFromGitHub {
|
2016-01-09 17:08:43 +00:00
|
|
|
sha256 = "1mx440wb1clis97nvgx67am9qssa3v11nb9irjzhnx44ygadhfcp";
|
|
|
|
rev = "v${version}";
|
2015-09-23 11:19:24 +01:00
|
|
|
repo = "sshuttle";
|
|
|
|
owner = "sshuttle";
|
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 ];
|
2015-09-23 11:19:24 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper pandoc ];
|
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;
|
|
|
|
inherit (src.meta) homepage;
|
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;
|
|
|
|
};
|
|
|
|
}
|