mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-06 20:23:39 +00:00
qownnotes: add shell completion
This commit is contained in:
parent
eac134318b
commit
1277f7d1e1
@ -14,6 +14,8 @@
|
||||
, botan2
|
||||
, pkg-config
|
||||
, nixosTests
|
||||
, installShellFiles
|
||||
, xvfb-run
|
||||
}:
|
||||
|
||||
let
|
||||
@ -34,6 +36,8 @@ stdenv.mkDerivation {
|
||||
qttools
|
||||
wrapQtAppsHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
xvfb-run
|
||||
] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
@ -49,9 +53,16 @@ stdenv.mkDerivation {
|
||||
"USE_SYSTEM_BOTAN=1"
|
||||
];
|
||||
|
||||
postInstall =
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd ${appname} \
|
||||
--bash <(xvfb-run $out/bin/${appname} --completion bash --allow-multiple-instances) \
|
||||
--fish <(xvfb-run $out/bin/${appname} --completion fish --allow-multiple-instances)
|
||||
installShellCompletion --cmd ${pname} \
|
||||
--bash <(xvfb-run $out/bin/${appname} --completion bash --allow-multiple-instances) \
|
||||
--fish <(xvfb-run $out/bin/${appname} --completion fish --allow-multiple-instances)
|
||||
''
|
||||
# Create a lowercase symlink for Linux
|
||||
lib.optionalString stdenv.isLinux ''
|
||||
+ lib.optionalString stdenv.isLinux ''
|
||||
ln -s $out/bin/${appname} $out/bin/${pname}
|
||||
''
|
||||
# Wrap application for macOS as lowercase binary
|
||||
|
Loading…
Reference in New Issue
Block a user