mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{ lib, stdenv
|
|
, python3Packages
|
|
, makeWrapper
|
|
, coreutils
|
|
, iptables
|
|
, nettools
|
|
, openssh
|
|
, procps
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "sshuttle";
|
|
version = "1.0.3";
|
|
|
|
src = python3Packages.fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "0fff1c88669a20bb6a4e7331960673a3a02a2e04ff163e4c9299496646edcf61";
|
|
};
|
|
|
|
patches = [ ./sudo.patch ];
|
|
|
|
nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ];
|
|
|
|
checkInputs = with python3Packages; [ mock pytest pytestcov pytestrunner flake8 ];
|
|
|
|
runtimeDeps = [ coreutils openssh procps ] ++ stdenv.lib.optionals stdenv.isLinux [ iptables nettools ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/sshuttle \
|
|
--prefix PATH : "${stdenv.lib.makeBinPath runtimeDeps}" \
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/sshuttle/sshuttle/";
|
|
description = "Transparent proxy server that works as a poor man's VPN";
|
|
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.
|
|
'';
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ domenkozar carlosdagos ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|