summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUdo Sauer <udo.sauer@bevuta.com>2023-08-06 17:41:03 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-08-10 18:56:00 +0000
commit1050eee2a2efdce788e43634567a105cb7d97d57 (patch)
tree544ae8d339b84edcaf1b83fa6456e76e0c90d2ef
parentmaintainers: add fernsehmuell (diff)
downloadnixpkgs-1050eee2a2efdce788e43634567a105cb7d97d57.tar.gz
hostmux: init at 1.4.0
-rw-r--r--pkgs/tools/misc/hostmux/default.nix54
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/misc/hostmux/default.nix b/pkgs/tools/misc/hostmux/default.nix
new file mode 100644
index 000000000000..27e714a5e7f7
--- /dev/null
+++ b/pkgs/tools/misc/hostmux/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, openssh
+, tmux
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "hostmux";
+ version = "1.4.0";
+
+ src = fetchFromGitHub {
+ owner = "hukl";
+ repo = "hostmux";
+ rev = finalAttrs.version;
+ hash = "sha256-odN7QFsU3MsWW8VabVjZH+8+AUFOUio8eF9ORv9iPEA=";
+ };
+
+ nativeBuildInputs = [
+ installShellFiles
+ ];
+
+ buildInputs = [
+ openssh
+ tmux
+ ];
+
+ postPatch = ''
+ substituteInPlace hostmux \
+ --replace "SSH_CMD=ssh" "SSH_CMD=${openssh}/bin/ssh" \
+ --replace "tmux -2" "${tmux}/bin/tmux -2" \
+ --replace "tmux s" "${tmux}/bin/tmux s"
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ install -Dm755 hostmux $out/bin/hostmux
+ installManPage man/hostmux.1
+ installShellCompletion --zsh zsh-completion/_hostmux
+
+ runHook postInstall
+ '';
+
+ meta = {
+ description = "Small wrapper script for tmux to easily connect to a series of hosts via ssh and open a split pane for each of the hosts";
+ homepage = "https://github.com/hukl/hostmux";
+ license = lib.licenses.mit;
+ mainProgram = "hostmux";
+ maintainers = with lib.maintainers; [ fernsehmuell ];
+ platforms = lib.platforms.unix;
+ };
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6f50a33754a5..e753db16eba5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1790,6 +1790,8 @@ with pkgs;
hexdiff = callPackage ../tools/misc/hexdiff { };
+ hostmux = callPackage ../tools/misc/hostmux { };
+
httm = darwin.apple_sdk_11_0.callPackage ../tools/filesystems/httm { };
inherit (callPackage ../tools/networking/ivpn/default.nix {}) ivpn ivpn-service;