diff options
Diffstat (limited to 'pkgs/tools/misc/tmux-sessionizer/default.nix')
-rw-r--r-- | pkgs/tools/misc/tmux-sessionizer/default.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/tools/misc/tmux-sessionizer/default.nix b/pkgs/tools/misc/tmux-sessionizer/default.nix index b6a3682ec757..2d2deb07dbd2 100644 --- a/pkgs/tools/misc/tmux-sessionizer/default.nix +++ b/pkgs/tools/misc/tmux-sessionizer/default.nix @@ -7,11 +7,12 @@ , Security , testers , tmux-sessionizer +, installShellFiles }: let name = "tmux-sessionizer"; - version = "0.4.2"; + version = "0.4.4"; in rustPlatform.buildRustPackage { @@ -22,10 +23,10 @@ rustPlatform.buildRustPackage { owner = "jrmoulton"; repo = name; rev = "v${version}"; - hash = "sha256-n6DXqsq3TsNob/fEqeOwNTVLPAvCr7CDN9qtXAiOMWQ="; + hash = "sha256-4xwpenoAVGKdVO3eSS4BhaEcwpNPGA5Ozie53focDlA="; }; - cargoHash = "sha256-e2U6x7HFoFbZxtJvY/ZpgEWagIrdRxPVZw2rP5aDIqg="; + cargoHash = "sha256-ajeCB1w/JHMT5e7mSwsh++lzLNfp0qfutONStpJpFDo="; passthru.tests.version = testers.testVersion { package = tmux-sessionizer; @@ -35,8 +36,15 @@ rustPlatform.buildRustPackage { # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ pkg-config installShellFiles ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd tms \ + --bash <($out/bin/tms --generate bash) \ + --fish <($out/bin/tms --generate fish) \ + --zsh <($out/bin/tms --generate zsh) + ''; meta = with lib; { description = "Fastest way to manage projects as tmux sessions"; |