From f893ddffc6c5fabc2a010c10c6f2dd825665c520 Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Fri, 30 Aug 2024 16:38:29 +0200 Subject: [PATCH] added sshp programm as nurPkg --- mods/nurPkgs/sshp.nix | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 mods/nurPkgs/sshp.nix diff --git a/mods/nurPkgs/sshp.nix b/mods/nurPkgs/sshp.nix new file mode 100644 index 0000000..6b49af8 --- /dev/null +++ b/mods/nurPkgs/sshp.nix @@ -0,0 +1,48 @@ +{ stdenv +, fetchFromGitHub +, lib +, pkgs +, ssh ? pkgs.openssh +}: + +stdenv.mkDerivation rec { + pname = "sshp"; + version = "master"; + + src = fetchFromGitHub { + owner = "bahamas10"; + repo = "sshp"; + rev = "69b02f3110c8f3a280eb07b44a80421ddd6c5812"; + sha256 = "sha256-E7nt+t1CS51YG16371LEPtQxHTJ54Ak+r0LP0erC9Mk="; + }; + + nativeBuildInputs = [ + ]; + + propagatedBuildInputs = [ + ssh + ]; + + installPhase = '' + mkdir -p $out/man/man1 + mkdir -p $out/bin + + cp man/sshp.1 $out/man/man1 + cp sshp $out/bin + ''; + + + meta = with lib; { + description = "Parallel SSH Executor "; + longDescription = '' + from: https://github.com/bahamas10/sshp + video: https://www.youtube.com/watch?v=m_Gr0510IHc + + sshp manages multiple ssh processes and handles coalescing the output to the terminal. By default, sshp will read a file of newline-separated hostnames or IPs and fork ssh subprocesses for them, redirecting the stdout and stderr streams of the child line-by-line to stdout of sshp itself. + ''; + homepage = "https://github.com/bahamas10/sshp"; + license = licenses.mit; + #maintainers = [ ]; + platforms = platforms.all; + }; +}