diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix index daa02497d0f..65d9165a26b 100644 --- a/pkgs/tools/security/sshuttle/default.nix +++ b/pkgs/tools/security/sshuttle/default.nix @@ -1,23 +1,29 @@ -{ stdenv, pythonPackages, fetchurl, makeWrapper, pandoc +{ stdenv, python3Packages, fetchurl, makeWrapper, pandoc , coreutils, iptables, nettools, openssh, procps }: -pythonPackages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { name = "sshuttle-${version}"; - version = "0.78.0"; + version = "0.78.3"; src = fetchurl { - sha256 = "18hrwi2gyri1n2rq0nghvv7hfhbhh5h67am89524vc1yyx40vn3b"; + sha256 = "12xyq5h77b57cnkljdk8qyjxzys512b73019s20x6ck5brj1m8wa"; url = "mirror://pypi/s/sshuttle/${name}.tar.gz"; }; patches = [ ./sudo.patch ]; - propagatedBuildInputs = with pythonPackages; [ PyXAPI mock pytest ]; - nativeBuildInputs = [ makeWrapper pandoc pythonPackages.setuptools_scm ]; + propagatedBuildInputs = with python3Packages; [ mock pytest ]; + nativeBuildInputs = [ makeWrapper pandoc python3Packages.setuptools_scm ]; buildInputs = [ coreutils openssh ] ++ stdenv.lib.optionals stdenv.isLinux [ iptables nettools procps ]; + checkInputs = with python3Packages; [ pytest pytestrunner ]; + + # Tests only run with Python 3. Server-side Python 2 still works if client + # uses Python 3, so it should be fine. + doCheck = true; + postInstall = let mapPath = f: x: stdenv.lib.concatStringsSep ":" (map f x); in ''