1{ lib, fetchFromGitHub, python3Packages, openssh, rsync }:
2
3python3Packages.buildPythonApplication rec {
4 pname = "pssh";
5 version = "2.3.4";
6
7 src = fetchFromGitHub {
8 owner = "lilydjwg";
9 repo = "pssh";
10 rev = "v${version}";
11 hash = "sha256-B1dIa6hNeq4iE8GKVhTp3Gzq7vp+v5Yyzj8uF8X71yg=";
12 };
13
14 postPatch = ''
15 for f in bin/*; do
16 substituteInPlace $f \
17 --replace "'ssh'" "'${openssh}/bin/ssh'" \
18 --replace "'scp'" "'${openssh}/bin/scp'" \
19 --replace "'rsync'" "'${rsync}/bin/rsync'"
20 done
21 '';
22
23 # Tests do not run with python3: https://github.com/lilydjwg/pssh/issues/126
24 doCheck = false;
25
26 meta = with lib; {
27 description = "Parallel SSH Tools";
28 longDescription = ''
29 PSSH provides parallel versions of OpenSSH and related tools,
30 including pssh, pscp, prsync, pnuke and pslurp.
31 '';
32 inherit (src.meta) homepage;
33 license = licenses.bsd3;
34 platforms = platforms.linux ++ platforms.darwin;
35 maintainers = with maintainers; [ chris-martin ];
36 };
37}