nixpkgs/pkgs/tools/security/sshuttle/default.nix
Tobias Geerinckx-Rice ffe94847a3 sshuttle: 0.61 -> 0.71
Account for a zany new build system & add myself as a maintainer.

Tested by connecting to a remote system and browsing the web & LAN,
both as root and a regular (sudo) user. Cool tool.

CC @iElectric
2015-09-23 12:19:24 +02:00

47 lines
1.4 KiB
Nix

{ stdenv, fetchFromGitHub, makeWrapper, pandoc
, coreutils, iptables, nettools, openssh, procps, python }:
let version = "0.71"; in
stdenv.mkDerivation rec {
name = "sshuttle-${version}";
src = fetchFromGitHub {
sha256 = "0yr8nih97jg6azfj3k7064lfbh3g36l6vwyjlngl4ph6mgcki1cm";
rev = name;
repo = "sshuttle";
owner = "sshuttle";
};
nativeBuildInputs = [ makeWrapper pandoc ];
buildInputs = [ coreutils iptables nettools openssh procps python ];
preConfigure = ''
cd src
'';
installPhase = ''
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)}"
install -Dm644 sshuttle.8 $out/share/man/man8/sshuttle.8
'';
meta = with stdenv.lib; {
inherit version;
inherit (src.meta) homepage;
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 at both ends).
Works with Linux and Mac OS and supports DNS tunneling.
'';
maintainers = with maintainers; [ iElectric nckx ];
platforms = platforms.unix;
};
}