bitcoin: add shell completions
Backport of https://github.com/NixOS/nixpkgs/pull/256091
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
, fetchurl
|
, fetchurl
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, installShellFiles
|
||||||
, util-linux
|
, util-linux
|
||||||
, hexdump
|
, hexdump
|
||||||
, autoSignDarwinBinariesHook
|
, autoSignDarwinBinariesHook
|
||||||
@@ -44,7 +45,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[ autoreconfHook pkg-config ]
|
[ autoreconfHook pkg-config installShellFiles ]
|
||||||
++ lib.optionals stdenv.isLinux [ util-linux ]
|
++ lib.optionals stdenv.isLinux [ util-linux ]
|
||||||
++ lib.optionals stdenv.isDarwin [ hexdump ]
|
++ lib.optionals stdenv.isDarwin [ hexdump ]
|
||||||
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
||||||
@@ -54,7 +55,11 @@ stdenv.mkDerivation rec {
|
|||||||
++ lib.optionals withWallet [ db48 sqlite ]
|
++ lib.optionals withWallet [ db48 sqlite ]
|
||||||
++ lib.optionals withGui [ qrencode qtbase qttools ];
|
++ lib.optionals withGui [ qrencode qtbase qttools ];
|
||||||
|
|
||||||
postInstall = lib.optionalString withGui ''
|
postInstall = ''
|
||||||
|
installShellCompletion --cmd bitcoin-cli --bash contrib/bitcoin-cli.bash-completion
|
||||||
|
installShellCompletion --cmd bitcoind --bash contrib/bitcoind.bash-completion
|
||||||
|
installShellCompletion --cmd bitcoin-tx --bash contrib/bitcoin-tx.bash-completion
|
||||||
|
'' + lib.optionalString withGui ''
|
||||||
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
|
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
|
||||||
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
|
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
|
||||||
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
|
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
|
||||||
|
|||||||
Reference in New Issue
Block a user