diff options
author | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-09-24 09:44:10 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-09-24 13:18:39 +0200 |
commit | 198dda950be230df9794833a0bc916a48bb13195 (patch) | |
tree | 372d3efdf612f7e104f67867f33c8ae7c2643ef3 /pkgs/tools/security/sshuttle | |
parent | d2f3041d270cba3746dbdb021a4be3d166517e77 (diff) |
sshuttle: add PyXAPI for tproxy UDP proxy support
Diffstat (limited to 'pkgs/tools/security/sshuttle')
-rw-r--r-- | pkgs/tools/security/sshuttle/default.nix | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix index d392f8a2fb63b..e085bfaaa91ab 100644 --- a/pkgs/tools/security/sshuttle/default.nix +++ b/pkgs/tools/security/sshuttle/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchpatch, makeWrapper, pandoc -, coreutils, iptables, nettools, openssh, procps, python }: +, coreutils, iptables, nettools, openssh, procps, pythonPackages }: let version = "0.71"; in stdenv.mkDerivation rec { @@ -28,20 +28,25 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ makeWrapper pandoc ]; - buildInputs = [ coreutils iptables nettools openssh procps python ]; + buildInputs = + [ coreutils iptables nettools openssh procps pythonPackages.python ]; + pythonPaths = with pythonPackages; [ PyXAPI ]; preConfigure = '' cd src ''; - installPhase = '' + installPhase = let + mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x); + in '' mkdir -p $out/share/sshuttle cp -R sshuttle *.py compat $out/share/sshuttle mkdir -p $out/bin ln -s $out/share/sshuttle/sshuttle $out/bin - wrapProgram $out/bin/sshuttle --prefix PATH : \ - "${stdenv.lib.concatStringsSep ":" (map (x: "${x}/bin") buildInputs)}" + 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 ''; |