2015-09-23 10:19:24 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, pandoc
|
|
|
|
, coreutils, iptables, nettools, openssh, procps, python }:
|
2013-10-05 14:45:51 +00:00
|
|
|
|
2015-09-23 10:19:24 +00:00
|
|
|
let version = "0.71"; in
|
2013-10-05 14:45:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sshuttle-${version}";
|
|
|
|
|
2015-09-23 10:19:24 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
sha256 = "0yr8nih97jg6azfj3k7064lfbh3g36l6vwyjlngl4ph6mgcki1cm";
|
|
|
|
rev = name;
|
|
|
|
repo = "sshuttle";
|
|
|
|
owner = "sshuttle";
|
2013-10-05 14:45:51 +00:00
|
|
|
};
|
|
|
|
|
2015-09-23 10:19:24 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pandoc ];
|
|
|
|
buildInputs = [ coreutils iptables nettools openssh procps python ];
|
2013-10-05 14:45:51 +00:00
|
|
|
|
2015-09-23 10:19:24 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cd src
|
|
|
|
'';
|
2013-10-05 14:45:51 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2015-09-23 10:19:24 +00:00
|
|
|
mkdir -p $out/share/sshuttle
|
|
|
|
cp -R sshuttle *.py compat $out/share/sshuttle
|
|
|
|
|
2013-10-05 14:45:51 +00:00
|
|
|
mkdir -p $out/bin
|
2015-09-23 10:19:24 +00:00
|
|
|
ln -s $out/share/sshuttle/sshuttle $out/bin
|
|
|
|
wrapProgram $out/bin/sshuttle --prefix PATH : \
|
|
|
|
"${stdenv.lib.concatStringsSep ":" (map (x: "${x}/bin") buildInputs)}"
|
|
|
|
|
|
|
|
install -Dm644 sshuttle.8 $out/share/man/man8/sshuttle.8
|
2013-10-05 14:45:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-09-23 10:19:24 +00:00
|
|
|
inherit version;
|
|
|
|
inherit (src.meta) homepage;
|
2013-10-05 14:45:51 +00:00
|
|
|
description = "Transparent proxy server that works as a poor man's VPN";
|
2015-09-23 10:19:24 +00: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 14:45:51 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|