Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-16.03 39 lines 1.4 kB view raw
1{ stdenv, pythonPackages, fetchurl, makeWrapper, pandoc 2, coreutils, iptables, nettools, openssh, procps }: 3 4pythonPackages.buildPythonApplication rec { 5 name = "sshuttle-${version}"; 6 version = "0.76"; 7 8 src = fetchurl { 9 sha256 = "1q0hr0vhdvv23cw5dqndsmf61283mvs6b14662ci00xj6zp5v48b"; 10 url = "https://pypi.python.org/packages/source/s/sshuttle/${name}.tar.gz"; 11 }; 12 13 patches = [ ./sudo.patch ]; 14 15 propagatedBuildInputs = with pythonPackages; [ PyXAPI mock pytest ]; 16 nativeBuildInputs = [ makeWrapper pandoc pythonPackages.setuptools_scm ]; 17 buildInputs = 18 [ coreutils openssh ] ++ 19 stdenv.lib.optionals stdenv.isLinux [ iptables nettools procps ]; 20 21 postInstall = let 22 mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x); 23 in '' 24 wrapProgram $out/bin/sshuttle \ 25 --prefix PATH : "${mapPath (x: "${x}/bin") buildInputs}" \ 26 ''; 27 28 meta = with stdenv.lib; { 29 homepage = https://github.com/sshuttle/sshuttle/; 30 description = "Transparent proxy server that works as a poor man's VPN"; 31 longDescription = '' 32 Forward connections over SSH, without requiring administrator access to the 33 target network (though it does require Python 2 at both ends). 34 Works with Linux and Mac OS and supports DNS tunneling. 35 ''; 36 maintainers = with maintainers; [ iElectric nckx ]; 37 platforms = platforms.unix; 38 }; 39}