diff options
author | figsoda <figsoda@pm.me> | 2023-09-22 10:44:00 -0400 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2023-09-22 10:44:00 -0400 |
commit | e7dd80a443df2607d08447907cebdd4f01382864 (patch) | |
tree | 2c8c96f044cd20f40c49b71c434116930ced3a2d | |
parent | 0a991e0394d321057bd5627bae111cd7b6cab71b (diff) |
pijul: install shell completions
-rw-r--r-- | pkgs/applications/version-management/pijul/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/applications/version-management/pijul/default.nix b/pkgs/applications/version-management/pijul/default.nix index 4d3cea9c00c9..1ea92e333d5b 100644 --- a/pkgs/applications/version-management/pijul/default.nix +++ b/pkgs/applications/version-management/pijul/default.nix @@ -1,6 +1,7 @@ { lib, stdenv , fetchCrate , rustPlatform +, installShellFiles , pkg-config , libsodium , openssl @@ -22,7 +23,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-mRi0NUETTdYE/oM+Jo7gW/zNby8dPAKl6XhzP0Qzsf0="; doCheck = false; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ openssl libsodium xxHash ] ++ (lib.optionals gitImportSupport [ libgit2 ]) ++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ @@ -31,6 +32,13 @@ rustPlatform.buildRustPackage rec { buildFeatures = lib.optional gitImportSupport "git"; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd pijul \ + --bash <($out/bin/pijul completion bash) \ + --fish <($out/bin/pijul completion fish) \ + --zsh <($out/bin/pijul completion zsh) + ''; + meta = with lib; { description = "A distributed version control system"; homepage = "https://pijul.org"; |