diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix index 01a3f3e1587a..24f7d78e4f56 100644 --- a/pkgs/applications/blockchains/bitcoin/default.nix +++ b/pkgs/applications/blockchains/bitcoin/default.nix @@ -3,6 +3,7 @@ , fetchurl , autoreconfHook , pkg-config +, installShellFiles , util-linux , hexdump , autoSignDarwinBinariesHook @@ -43,7 +44,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = - [ autoreconfHook pkg-config ] + [ autoreconfHook pkg-config installShellFiles ] ++ lib.optionals stdenv.isLinux [ util-linux ] ++ lib.optionals stdenv.isDarwin [ hexdump ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] @@ -53,7 +54,19 @@ stdenv.mkDerivation rec { ++ lib.optionals withWallet [ db48 sqlite ] ++ lib.optionals withGui [ qrencode qtbase qttools ]; - postInstall = lib.optionalString withGui '' + postInstall = '' + installShellCompletion --cmd bitcoin-cli --bash contrib/completions/bash/bitcoin-cli.bash-completion + installShellCompletion --cmd bitcoind --bash contrib/completions/bash/bitcoind.bash-completion + installShellCompletion --cmd bitcoin-tx --bash contrib/completions/bash/bitcoin-tx.bash-completion + + installShellCompletion --fish contrib/completions/fish/bitcoin-cli.fish + installShellCompletion --fish contrib/completions/fish/bitcoind.fish + installShellCompletion --fish contrib/completions/fish/bitcoin-tx.fish + installShellCompletion --fish contrib/completions/fish/bitcoin-util.fish + installShellCompletion --fish contrib/completions/fish/bitcoin-wallet.fish + '' + lib.optionalString withGui '' + installShellCompletion --fish contrib/completions/fish/bitcoin-qt.fish + install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin" install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png