1 { lib, stdenv, fetchurl, autoreconfHook, perl, readline, rsh, ssh, slurm, slurmSupport ? false }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/chaos/pdsh/releases/download/pdsh-${version}/pdsh-${version}.tar.gz";
9 sha256 = "1s91hmhrz7rfb6h3l5k97s393rcm1ww3svp8dx5z8vkkc933wyxl";
12 buildInputs = [ perl readline ssh ]
13 ++ (lib.optional slurmSupport slurm);
15 nativeBuildInputs = [ autoreconfHook ];
17 # Do not use git to derive a version.
19 sed -i 's/m4_esyscmd(\[git describe.*/[${version}])/' configure.ac
24 "--infodir=$out/share/info"
25 "--mandir=$out/share/man"
26 "--with-machines=/etc/pdsh/machines"
27 ${if readline == null then "--without-readline" else "--with-readline"}
28 ${if ssh == null then "--without-ssh" else "--with-ssh"}
29 ${if rsh == false then "--without-rsh" else "--with-rsh"}
30 ${if slurmSupport then "--with-slurm" else "--without-slurm"}
34 '--with-rcmd-rank-list=ssh,krb4,exec,xcpu,rsh'
39 homepage = "https://github.com/chaos/pdsh";
40 description = "High-performance, parallel remote shell utility";
41 license = lib.licenses.gpl2;
44 Pdsh is a high-performance, parallel remote shell utility. It has
45 built-in, thread-safe clients for Berkeley and Kerberos V4 rsh and
46 can call SSH externally (though with reduced performance). Pdsh
47 uses a "sliding window" parallel algorithm to conserve socket
48 resources on the initiating node and to allow progress to continue
49 while timeouts occur on some connections.
52 platforms = lib.platforms.unix;