summary refs log tree commit diff
path: root/pkgs/tools/networking/pdsh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/pdsh/default.nix')
-rw-r--r--pkgs/tools/networking/pdsh/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/tools/networking/pdsh/default.nix b/pkgs/tools/networking/pdsh/default.nix
index 9dd1a5581c5..87601b0ddf3 100644
--- a/pkgs/tools/networking/pdsh/default.nix
+++ b/pkgs/tools/networking/pdsh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, readline, rsh, ssh }:
+{ lib, stdenv, fetchurl, perl, readline, rsh, ssh, slurm, slurmSupport ? false }:
 
 stdenv.mkDerivation rec {
   name = "pdsh-2.34";
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1s91hmhrz7rfb6h3l5k97s393rcm1ww3svp8dx5z8vkkc933wyxl";
   };
 
-  buildInputs = [ perl readline ssh ];
+  buildInputs = [ perl readline ssh ]
+    ++ (lib.optional slurmSupport slurm);
 
   preConfigure = ''
     configureFlagsArray=(
@@ -18,6 +19,7 @@ stdenv.mkDerivation rec {
       ${if readline == null then "--without-readline" else "--with-readline"}
       ${if ssh == null then "--without-ssh" else "--with-ssh"}
       ${if rsh == false then "--without-rsh" else "--with-rsh"}
+      ${if slurmSupport then "--with-slurm" else "--without-slurm"}
       "--with-dshgroups"
       "--with-xcpu"
       "--disable-debug"
@@ -28,7 +30,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://github.com/chaos/pdsh";
     description = "High-performance, parallel remote shell utility";
-    license = stdenv.lib.licenses.gpl2;
+    license = lib.licenses.gpl2;
 
     longDescription = ''
       Pdsh is a high-performance, parallel remote shell utility. It has
@@ -39,7 +41,7 @@ stdenv.mkDerivation rec {
       while timeouts occur on some connections.
     '';
 
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.peti ];
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.peti ];
   };
 }