diff options
Diffstat (limited to 'pkgs/applications/networking/mullvad/mullvad.nix')
-rw-r--r-- | pkgs/applications/networking/mullvad/mullvad.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mullvad/mullvad.nix b/pkgs/applications/networking/mullvad/mullvad.nix index 0d62c3c7ce96c..f23ba1561a6c3 100644 --- a/pkgs/applications/networking/mullvad/mullvad.nix +++ b/pkgs/applications/networking/mullvad/mullvad.nix @@ -15,6 +15,7 @@ , enableOpenvpn ? true , openvpn-mullvad , shadowsocks-rust +, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "mullvad"; @@ -44,6 +45,7 @@ rustPlatform.buildRustPackage rec { protobuf makeWrapper git + installShellFiles ]; buildInputs = [ @@ -59,6 +61,17 @@ rustPlatform.buildRustPackage rec { ln -s ${libwg}/lib/libwg.a $dest ''; + postInstall = '' + compdir=$(mktemp -d) + for shell in bash zsh fish; do + $out/bin/mullvad shell-completions $shell $compdir + done + installShellCompletion --cmd mullvad \ + --bash $compdir/mullvad.bash \ + --zsh $compdir/_mullvad \ + --fish $compdir/mullvad.fish + ''; + postFixup = # Place all binaries in the 'mullvad-' namespace, even though these # specific binaries aren't used in the lifetime of the program. |