at 24.05-pre 1.6 kB view raw
1{ lib 2, stdenv 3, python3Packages 4, fetchPypi 5, installShellFiles 6, makeWrapper 7, sphinx 8, coreutils 9, iptables 10, nettools 11, openssh 12, procps 13}: 14 15python3Packages.buildPythonApplication rec { 16 pname = "sshuttle"; 17 version = "1.1.1"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "sha256-9aPtHlqxITx6bfhgr0HxqQOrLK+/73Hzcazc/yHmnuY="; 22 }; 23 24 patches = [ ./sudo.patch ]; 25 26 postPatch = '' 27 substituteInPlace setup.cfg \ 28 --replace '--cov=sshuttle --cov-branch --cov-report=term-missing' "" 29 ''; 30 31 nativeBuildInputs = [ 32 installShellFiles 33 makeWrapper 34 python3Packages.setuptools-scm 35 sphinx 36 ]; 37 38 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 39 40 postBuild = '' 41 make man -C docs 42 ''; 43 44 postInstall = '' 45 installManPage docs/_build/man/* 46 47 wrapProgram $out/bin/sshuttle \ 48 --prefix PATH : "${lib.makeBinPath ([ coreutils openssh procps ] ++ lib.optionals stdenv.isLinux [ iptables nettools ])}" \ 49 ''; 50 51 meta = with lib; { 52 description = "Transparent proxy server that works as a poor man's VPN"; 53 longDescription = '' 54 Forward connections over SSH, without requiring administrator access to the 55 target network (though it does require Python 2.7, Python 3.5 or later at both ends). 56 Works with Linux and Mac OS and supports DNS tunneling. 57 ''; 58 homepage = "https://github.com/sshuttle/sshuttle"; 59 changelog = "https://github.com/sshuttle/sshuttle/blob/v${version}/CHANGES.rst"; 60 license = licenses.lgpl21Plus; 61 maintainers = with maintainers; [ domenkozar carlosdagos ]; 62 }; 63}