diff options
author | Sofi <sofi+git@mailbox.org> | 2022-07-21 01:01:17 +0200 |
---|---|---|
committer | Sofi <sofi+git@mailbox.org> | 2022-07-21 01:01:53 +0200 |
commit | 2e86faf11a830fa12d210d5f0591359c9253106f (patch) | |
tree | d8d83e70adce93518196fe8d91c3a1d5602a8e5c /pkgs/games/ferium | |
parent | c5eb9af9c9b9e002ff5de111d2524f9df85e6e59 (diff) |
ferium: add shell completions
Diffstat (limited to 'pkgs/games/ferium')
-rw-r--r-- | pkgs/games/ferium/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/games/ferium/default.nix b/pkgs/games/ferium/default.nix index d84b1c556153..f72ce4da7eeb 100644 --- a/pkgs/games/ferium/default.nix +++ b/pkgs/games/ferium/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }: +{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "ferium"; @@ -21,6 +21,15 @@ rustPlatform.buildRustPackage rec { # Requires an internet connection doCheck = false; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + for shell in bash fish zsh; do + $out/bin/ferium complete $shell > ferium.$shell + installShellCompletion ferium.$shell + done + ''; + meta = with lib; { description = "Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases"; homepage = "https://github.com/gorilla-devs/ferium"; |