sshuttle: 0.71 -> 0.74
the tags are now in a different form sshuttle is now a real python package
This commit is contained in:
parent
2b7b3aa5e0
commit
573ec2d9ae
@ -1,54 +1,30 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper, pandoc
|
{ stdenv, pythonPackages, fetchFromGitHub, makeWrapper, pandoc
|
||||||
, coreutils, iptables, nettools, openssh, procps, pythonPackages }:
|
, coreutils, iptables, nettools, openssh, procps }:
|
||||||
|
|
||||||
let version = "0.71"; in
|
pythonPackages.buildPythonPackage rec {
|
||||||
stdenv.mkDerivation rec {
|
version = "0.74";
|
||||||
name = "sshuttle-${version}";
|
name = "sshuttle-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
sha256 = "0yr8nih97jg6azfj3k7064lfbh3g36l6vwyjlngl4ph6mgcki1cm";
|
sha256 = "1mx440wb1clis97nvgx67am9qssa3v11nb9irjzhnx44ygadhfcp";
|
||||||
rev = name;
|
rev = "v${version}";
|
||||||
repo = "sshuttle";
|
repo = "sshuttle";
|
||||||
owner = "sshuttle";
|
owner = "sshuttle";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [ ./sudo.patch ];
|
||||||
(fetchpatch {
|
|
||||||
sha256 = "1yrjyvdz6k6zk020dmbagf8w49w8vhfbzgfpsq9jqdh2hbykv3m3";
|
|
||||||
url = https://github.com/sshuttle/sshuttle/commit/3cf5002b62650c26a50e18af8d8c5c91d754bab9.patch;
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
sha256 = "091gg28cnmx200q46bcnxpp9ih9p5qlq0r3bxfm0f4qalg8rmp2g";
|
|
||||||
url = https://github.com/sshuttle/sshuttle/commit/d70b5f2b89e593506834cf8ea10785d96c801dfc.patch;
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
sha256 = "17l9h8clqlbyxdkssavxqpb902j7b3yabrrdalybfpkhj69x8ghk";
|
|
||||||
url = https://github.com/sshuttle/sshuttle/commit/a38963301e9c29fbe3232f0a41ea080b642c5ad2.patch;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
|
propagatedBuildInputs = with pythonPackages; [ PyXAPI mock pytest ];
|
||||||
nativeBuildInputs = [ makeWrapper pandoc ];
|
nativeBuildInputs = [ makeWrapper pandoc ];
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ coreutils iptables nettools openssh procps pythonPackages.python ];
|
[ coreutils openssh ] ++
|
||||||
pythonPaths = with pythonPackages; [ PyXAPI ];
|
stdenv.lib.optionals stdenv.isLinux [ iptables nettools procps ];
|
||||||
|
|
||||||
preConfigure = ''
|
postInstall = let
|
||||||
cd src
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = let
|
|
||||||
mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x);
|
mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x);
|
||||||
in ''
|
in ''
|
||||||
mkdir -p $out/share/sshuttle
|
wrapProgram $out/bin/sshuttle \
|
||||||
cp -R sshuttle *.py compat $out/share/sshuttle
|
--prefix PATH : "${mapPath (x: "${x}/bin") buildInputs}" \
|
||||||
|
|
||||||
mkdir -p $out/bin
|
|
||||||
ln -s $out/share/sshuttle/sshuttle $out/bin
|
|
||||||
wrapProgram $out/bin/sshuttle \
|
|
||||||
--prefix PATH : "${mapPath (x: "${x}/bin") buildInputs}" \
|
|
||||||
--prefix PYTHONPATH : "${mapPath (x: "$(toPythonPath ${x})") pythonPaths}"
|
|
||||||
|
|
||||||
install -Dm644 sshuttle.8 $out/share/man/man8/sshuttle.8
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
13
pkgs/tools/security/sshuttle/sudo.patch
Normal file
13
pkgs/tools/security/sshuttle/sudo.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/sshuttle/client.py b/sshuttle/client.py
|
||||||
|
index 7a7b6d7..8dde615 100644
|
||||||
|
--- a/sshuttle/client.py
|
||||||
|
+++ b/sshuttle/client.py
|
||||||
|
@@ -158,7 +158,7 @@ class FirewallClient:
|
||||||
|
def __init__(self, method_name):
|
||||||
|
self.auto_nets = []
|
||||||
|
python_path = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
- argvbase = ([sys.executable, sys.argv[0]] +
|
||||||
|
+ argvbase = ([sys.argv[0]] +
|
||||||
|
['-v'] * (helpers.verbose or 0) +
|
||||||
|
['--method', method_name] +
|
||||||
|
['--firewall'])
|
Loading…
Reference in New Issue
Block a user