2021-07-18 21:22:44 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-07-18 16:06:22 +00:00
|
|
|
, python3Packages
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchFromGitHub
|
2023-08-22 20:05:09 +00:00
|
|
|
, installShellFiles
|
2020-07-18 16:06:22 +00:00
|
|
|
, makeWrapper
|
2023-08-22 20:05:09 +00:00
|
|
|
, sphinx
|
2020-07-18 16:06:22 +00:00
|
|
|
, coreutils
|
|
|
|
, iptables
|
|
|
|
, nettools
|
|
|
|
, openssh
|
|
|
|
, procps
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "sshuttle";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.1.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sshuttle";
|
|
|
|
repo = "sshuttle";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-7jiDTjtL4FiQ4GimSPtUDKPUA29l22a7XILN/s4/DQY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./sudo.patch ];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
makeWrapper
|
|
|
|
python3Packages.setuptools-scm
|
|
|
|
sphinx
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [ pytest-cov-stub pytestCheckHook ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postBuild = ''
|
|
|
|
make man -C docs
|
|
|
|
'';
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
postInstall = ''
|
2023-08-22 20:05:09 +00:00
|
|
|
installManPage docs/_build/man/*
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
wrapProgram $out/bin/sshuttle \
|
2024-09-26 11:04:55 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath ([ coreutils openssh procps ] ++ lib.optionals stdenv.hostPlatform.isLinux [ iptables nettools ])}" \
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Transparent proxy server that works as a poor man's VPN";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sshuttle";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Forward connections over SSH, without requiring administrator access to the
|
|
|
|
target network (though it does require Python 2.7, Python 3.5 or later at both ends).
|
|
|
|
Works with Linux and Mac OS and supports DNS tunneling.
|
|
|
|
'';
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/sshuttle/sshuttle";
|
|
|
|
changelog = "https://github.com/sshuttle/sshuttle/blob/v${version}/CHANGES.rst";
|
|
|
|
license = licenses.lgpl21Plus;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ domenkozar carlosdagos ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|