git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #10017 from nckx/update-sshuttle

sshuttle: 0.61 -> 0.71

commit272cd6f7821ed3421cb7642d1967b55372f6e10e authorDomen Kožar <domen@dev.si> dateWed 23 Sep 2015, 19:04 (11 years ago) parente9f2dc8ffe9484
1 file changed+29−17
pkgs/tools/security/sshuttle/default.nix+29−17
pkgs/tools/security/sshuttle/default.nix+29−17
@@ -1,34 +1,46 @@
1−{ stdenv, fetchurl, iptables, python, pythonPackages }:
1+{ stdenv, fetchFromGitHub, makeWrapper, pandoc
2+, coreutils, iptables, nettools, openssh, procps, python }:
23
4+let version = "0.71"; in
35stdenv.mkDerivation rec {
46 name = "sshuttle-${version}";
5− version = "0.61";
67
7− src = fetchurl {
8− url = "https://github.com/apenwarr/sshuttle/archive/sshuttle-0.61.tar.gz";
9− sha256 = "1v2v1kbwnmx6ygzhbgqcmyafx914s2p7vjp7l0pf52sa7qkliy9b";
8+ src = fetchFromGitHub {
9+ sha256 = "0yr8nih97jg6azfj3k7064lfbh3g36l6vwyjlngl4ph6mgcki1cm";
10+ rev = name;
11+ repo = "sshuttle";
12+ owner = "sshuttle";
1013 };
1114
12− preBuild = ''
13− substituteInPlace Documentation/all.do --replace "/bin/ls" "$(type -tP ls)";
14− substituteInPlace Documentation/md2man.py --replace "/usr/bin/env python" "${python}/bin/python"
15− '';
15+ nativeBuildInputs = [ makeWrapper pandoc ];
16+ buildInputs = [ coreutils iptables nettools openssh procps python ];
1617
17− phases = "unpackPhase installPhase";
18+ preConfigure = ''
19+ cd src
20+ '';
1821
1922 installPhase = ''
23+ mkdir -p $out/share/sshuttle
24+ cp -R sshuttle *.py compat $out/share/sshuttle
25+
2026 mkdir -p $out/bin
21− cp -R . $out
22− ln -s $out/sshuttle $out/bin/sshuttle
27+ ln -s $out/share/sshuttle/sshuttle $out/bin
28+ wrapProgram $out/bin/sshuttle --prefix PATH : \
29+ "${stdenv.lib.concatStringsSep ":" (map (x: "${x}/bin") buildInputs)}"
30+
31+ install -Dm644 sshuttle.8 $out/share/man/man8/sshuttle.8
2332 '';
2433
25−
26− buildInputs = [ iptables python pythonPackages.markdown pythonPackages.beautifulsoup ];
27−
2834 meta = with stdenv.lib; {
29− homepage = https://github.com/apenwarr/sshuttle;
35+ inherit version;
36+ inherit (src.meta) homepage;
3037 description = "Transparent proxy server that works as a poor man's VPN";
31− maintainers = with maintainers; [ iElectric ];
38+ longDescription = ''
39+ Forward connections over SSH, without requiring administrator access to the
40+ target network (though it does require Python 2 at both ends).
41+ Works with Linux and Mac OS and supports DNS tunneling.
42+ '';
43+ maintainers = with maintainers; [ iElectric nckx ];
3244 platforms = platforms.unix;
3345 };
3446}