dstask: add shell completion support (#498792)
This commit is contained in:
@@ -23052,6 +23052,13 @@
|
||||
githubId = 4196789;
|
||||
name = "Nathan Ringo";
|
||||
};
|
||||
remidupre = {
|
||||
email = "remi+nixpkgs@dupre.io";
|
||||
github = "remi-dupre";
|
||||
githubId = 1173464;
|
||||
name = "Rémi Dupré";
|
||||
keys = [ { fingerprint = "4762 C65B F8D8 6A33 65C1 D10A 4613 02CD 1249 4653"; } ];
|
||||
};
|
||||
remix7531 = {
|
||||
email = "remix7531@mailbox.org";
|
||||
github = "remix7531";
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "dstask";
|
||||
version = "1.0.1";
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "naggie";
|
||||
repo = "dstask";
|
||||
@@ -24,6 +30,13 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd dstask \
|
||||
--bash <($out/bin/dstask bash-completion) \
|
||||
--fish <($out/bin/dstask fish-completion) \
|
||||
--zsh <($out/bin/dstask zsh-completion)
|
||||
'';
|
||||
|
||||
# The ldflags reduce the executable size by stripping some debug stuff.
|
||||
# The other variables are set so that the output of dstask version shows the
|
||||
# git ref and the release version from github.
|
||||
@@ -39,6 +52,9 @@ buildGoModule (finalAttrs: {
|
||||
description = "Command line todo list with super-reliable git sync";
|
||||
homepage = finalAttrs.src.meta.homepage;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ stianlagstad ];
|
||||
maintainers = with lib.maintainers; [
|
||||
remidupre
|
||||
stianlagstad
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user