joshuto: install shell completions

xrelkd 2e2fc891 f2da1f1e

+16 -1
+16 -1
pkgs/applications/file-managers/joshuto/default.nix
··· 1 - { lib, rustPlatform, fetchFromGitHub, stdenv, darwin }: 2 3 rustPlatform.buildRustPackage rec { 4 pname = "joshuto"; ··· 13 14 cargoHash = "sha256-gMX8hvt20V4XUd0nnXGA4fyOUfB7ZY1eeme9HgYopL0="; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ 17 darwin.apple_sdk.frameworks.Foundation 18 ]; 19 20 meta = with lib; { 21 description = "Ranger-like terminal file manager written in Rust";
··· 1 + { lib 2 + , rustPlatform 3 + , fetchFromGitHub 4 + , installShellFiles 5 + , stdenv 6 + , darwin 7 + }: 8 9 rustPlatform.buildRustPackage rec { 10 pname = "joshuto"; ··· 19 20 cargoHash = "sha256-gMX8hvt20V4XUd0nnXGA4fyOUfB7ZY1eeme9HgYopL0="; 21 22 + nativeBuildInputs = [ installShellFiles ]; 23 + 24 buildInputs = lib.optionals stdenv.isDarwin [ 25 darwin.apple_sdk.frameworks.Foundation 26 ]; 27 + 28 + postInstall = '' 29 + installShellCompletion --cmd joshuto \ 30 + --bash <($out/bin/joshuto completions bash) \ 31 + --zsh <($out/bin/joshuto completions zsh) \ 32 + --fish <($out/bin/joshuto completions fish) 33 + ''; 34 35 meta = with lib; { 36 description = "Ranger-like terminal file manager written in Rust";