diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d39199428af3..92e3aad13f23 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -876,6 +876,12 @@ matrix = "aiya:catgirl.cloud"; name = "aiya"; }; + aietes = { + email = "stefan@standa.de"; + github = "Aietes"; + githubId = 5823770; + name = "Stefan Krüger"; + }; aij = { email = "aij+git@mrph.org"; github = "aij"; diff --git a/pkgs/by-name/sm/smux/package.nix b/pkgs/by-name/sm/smux/package.nix new file mode 100644 index 000000000000..4bc93de97d24 --- /dev/null +++ b/pkgs/by-name/sm/smux/package.nix @@ -0,0 +1,62 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + installShellFiles, + makeWrapper, + tmux, + fzf, + zoxide, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "smux"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "Aietes"; + repo = "smux"; + tag = "v${finalAttrs.version}"; + hash = "sha256-mc7sspGN4Wf8Jn995S/jsZ0v1s5kgJ0ASn9iGbzH13U="; + }; + + cargoHash = "sha256-nUJwIOdVmZR+inDz4kYpPTFXREyZyf891ATed6UFIJo="; + + __structuredAttrs = true; + strictDeps = true; + + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + $out/bin/smux completions zsh --dir completions + installShellCompletion --zsh completions/_smux + + $out/bin/smux man --dir man + installManPage man/*.1 + installManPage man/*.5 + ''; + + postFixup = '' + wrapProgram $out/bin/smux \ + --prefix PATH : ${ + lib.makeBinPath [ + tmux + fzf + zoxide + ] + } + ''; + + meta = { + description = "Tmux session manager with fzf-powered project and template selection"; + homepage = "https://github.com/Aietes/smux"; + license = lib.licenses.mit; + mainProgram = "smux"; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ aietes ]; + }; +})