nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 58 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 installShellFiles, 6 openssh, 7 tmux, 8 gitUpdater, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "hostmux"; 13 version = "1.4.1"; 14 15 src = fetchFromGitHub { 16 owner = "hukl"; 17 repo = "hostmux"; 18 rev = finalAttrs.version; 19 hash = "sha256-Rh8eyKoUydixj+X7muWleZW9u8djCQAyexIfRWIOr0o="; 20 }; 21 22 nativeBuildInputs = [ 23 installShellFiles 24 ]; 25 26 buildInputs = [ 27 openssh 28 tmux 29 ]; 30 31 postPatch = '' 32 substituteInPlace hostmux \ 33 --replace "SSH_CMD=ssh" "SSH_CMD=${lib.getExe openssh}" \ 34 --replace "TMUX_CMD=tmux" "TMUX_CMD=${lib.getExe tmux}" 35 ''; 36 37 installPhase = '' 38 runHook preInstall 39 40 install -Dm755 hostmux $out/bin/hostmux 41 installManPage man/hostmux.1 42 installShellCompletion --zsh zsh-completion/_hostmux 43 44 runHook postInstall 45 ''; 46 47 passthru.updateScript = gitUpdater { }; 48 49 meta = { 50 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"; 51 homepage = "https://github.com/hukl/hostmux"; 52 changelog = "https://github.com/hukl/hostmux/releases/tag/${finalAttrs.version}"; 53 license = lib.licenses.mit; 54 mainProgram = "hostmux"; 55 maintainers = with lib.maintainers; [ fernsehmuell ]; 56 platforms = lib.platforms.unix; 57 }; 58})