summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-09-24 09:44:10 +0200
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-09-24 13:18:39 +0200
commit198dda950be230df9794833a0bc916a48bb13195 (patch)
tree372d3efdf612f7e104f67867f33c8ae7c2643ef3 /pkgs/tools
parentd2f3041d270cba3746dbdb021a4be3d166517e77 (diff)
downloadnixlib-198dda950be230df9794833a0bc916a48bb13195.tar
nixlib-198dda950be230df9794833a0bc916a48bb13195.tar.gz
nixlib-198dda950be230df9794833a0bc916a48bb13195.tar.bz2
nixlib-198dda950be230df9794833a0bc916a48bb13195.tar.lz
nixlib-198dda950be230df9794833a0bc916a48bb13195.tar.xz
nixlib-198dda950be230df9794833a0bc916a48bb13195.tar.zst
nixlib-198dda950be230df9794833a0bc916a48bb13195.zip
sshuttle: add PyXAPI for tproxy UDP proxy support
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/security/sshuttle/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix
index d392f8a2fb63..e085bfaaa91a 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
   '';