crun: 1.8.3 -> 1.8.4
[NixPkgs.git] / pkgs / tools / networking / pdsh / default.nix
blob43aa6f9f147017b361d40f7f80a99211b00c641e
1 { lib, stdenv, fetchurl, autoreconfHook, perl, readline, rsh, ssh, slurm, slurmSupport ? false }:
3 stdenv.mkDerivation rec {
4   pname = "pdsh";
5   version = "2.34";
7   src = fetchurl {
8     url = "https://github.com/chaos/pdsh/releases/download/pdsh-${version}/pdsh-${version}.tar.gz";
9     sha256 = "1s91hmhrz7rfb6h3l5k97s393rcm1ww3svp8dx5z8vkkc933wyxl";
10   };
12   buildInputs = [ perl readline ssh ]
13     ++ (lib.optional slurmSupport slurm);
15   nativeBuildInputs = [ autoreconfHook ];
17   # Do not use git to derive a version.
18   postPatch = ''
19     sed -i 's/m4_esyscmd(\[git describe.*/[${version}])/' configure.ac
20   '';
22   preConfigure = ''
23     configureFlagsArray=(
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"}
31       "--with-dshgroups"
32       "--with-xcpu"
33       "--disable-debug"
34       '--with-rcmd-rank-list=ssh,krb4,exec,xcpu,rsh'
35     )
36   '';
38   meta = {
39     homepage = "https://github.com/chaos/pdsh";
40     description = "High-performance, parallel remote shell utility";
41     license = lib.licenses.gpl2;
43     longDescription = ''
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.
50     '';
52     platforms = lib.platforms.unix;
53   };