@@ -1,4 +1,5 @@
1−{ stdenv, fetchFromGitHub, rustPlatform, coreutils, bash, dash }:
1+{ stdenv, fetchFromGitHub, rustPlatform, coreutils, bash, dash
2+, installShellFiles }:
23
34rustPlatform.buildRustPackage rec {
45 pname = "just";
@@ -13,14 +14,14 @@ rustPlatform.buildRustPackage rec {
1314
1415 cargoSha256 = "05mrzav3aydvwac9jjckdmlxvxnlcncmkfsdb9z7zvxia4k89w1l";
1516
16− postInstall = ''
17− # generate completion scripts for just
17+ nativeBuildInputs = [ installShellFiles ];
1818
19− mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
19+ postInstall = ''
20+ installManPage man/just.1
2021
21− $out/bin/just --completions bash > "$out/share/bash-completion/completions/just"
22− $out/bin/just --completions fish > "$out/share/fish/vendor_completions.d/just.fish"
23− $out/bin/just --completions zsh > "$out/share/zsh/site-functions/_just"
22+ installShellCompletion --bash --name just.bash completions/just.bash
23+ installShellCompletion --fish --name just.fish completions/just.fish
24+ installShellCompletion --zsh --name _just completions/just.zsh
2425 '';
2526
2627 checkInputs = [ coreutils bash dash ];