joshuto: install shell completions

xrelkd 2e2fc891 f2da1f1e

+16 -1
+16 -1
pkgs/applications/file-managers/joshuto/default.nix
··· 1 - { lib, rustPlatform, fetchFromGitHub, stdenv, darwin }: 1 + { lib 2 + , rustPlatform 3 + , fetchFromGitHub 4 + , installShellFiles 5 + , stdenv 6 + , darwin 7 + }: 2 8 3 9 rustPlatform.buildRustPackage rec { 4 10 pname = "joshuto"; ··· 13 19 14 20 cargoHash = "sha256-gMX8hvt20V4XUd0nnXGA4fyOUfB7ZY1eeme9HgYopL0="; 15 21 22 + nativeBuildInputs = [ installShellFiles ]; 23 + 16 24 buildInputs = lib.optionals stdenv.isDarwin [ 17 25 darwin.apple_sdk.frameworks.Foundation 18 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 + ''; 19 34 20 35 meta = with lib; { 21 36 description = "Ranger-like terminal file manager written in Rust";