Skip to content

Commit

Permalink
tilt: add completions
Browse files Browse the repository at this point in the history
  • Loading branch information
znd4 committed Jan 16, 2025
1 parent fa4acf2 commit 67bd3cc
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions pkgs/by-name/ti/tilt/binary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
src,
version,
tilt-assets,
stdenv,
installShellFiles,
}:

buildGoModule rec {
(buildGoModule rec {
pname = "tilt";
/*
Do not use "dev" as a version. If you do, Tilt will consider itself
Expand All @@ -21,16 +23,30 @@ buildGoModule rec {

ldflags = [ "-X main.version=${version}" ];

nativeBuildInputs = [ installShellFiles ];

preBuild = ''
mkdir -p pkg/assets/build
cp -r ${tilt-assets}/* pkg/assets/build/
'';

postInstall = '''';

meta = {
description = "Local development tool to manage your developer instance when your team deploys to Kubernetes in production";
mainProgram = "tilt";
homepage = "https://tilt.dev/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ anton-dessiatov ];
};
}
}).overrideAttrs
(old: {
postInstall =
(old.postInstall or "")
+ ''
installShellCompletion --cmd tilt \
--bash <($out/bin/tilt completion bash) \
--fish <($out/bin/tilt completion fish) \
--zsh <($out/bin/tilt completion zsh)
'';
})

0 comments on commit 67bd3cc

Please sign in to comment.