Merge pull request #277576 from donovanglover/satty

satty: add shell completions
This commit is contained in:
Nick Cao 2024-01-01 15:40:57 -05:00 committed by GitHub
commit 9a15f0b632
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@
, libadwaita
, pango
, copyDesktopItems
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
@ -30,6 +31,7 @@ rustPlatform.buildRustPackage rec {
copyDesktopItems
pkg-config
wrapGAppsHook4
installShellFiles
];
buildInputs = [
@ -43,6 +45,11 @@ rustPlatform.buildRustPackage rec {
postInstall = ''
install -Dt $out/share/icons/hicolor/scalable/apps/ assets/satty.svg
installShellCompletion --cmd satty \
--bash completions/satty.bash \
--fish completions/satty.fish \
--zsh completions/_satty
'';
desktopItems = [ "satty.desktop" ];
@ -51,7 +58,7 @@ rustPlatform.buildRustPackage rec {
description = "A screenshot annotation tool inspired by Swappy and Flameshot";
homepage = "https://github.com/gabm/Satty";
license = licenses.mpl20;
maintainers = with maintainers; [ pinpox ];
maintainers = with maintainers; [ pinpox donovanglover ];
mainProgram = "satty";
platforms = lib.platforms.linux;
};