Skip to content

Commit f3f7695

Browse files
committed
korrect: init at 0.1.2
1 parent b73d59b commit f3f7695

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

pkgs/by-name/ko/korrect/package.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchCrate,
5+
rustPlatform,
6+
installShellFiles,
7+
nix-update-script,
8+
}:
9+
10+
rustPlatform.buildRustPackage (finalAttrs: {
11+
pname = "korrect";
12+
version = "0.1.2";
13+
14+
src = fetchCrate {
15+
inherit (finalAttrs) pname version;
16+
hash = "sha256-ONM9S9M02XEpB4k7M2aJsQOduzNvlXbAIiebCJzO1uo=";
17+
};
18+
cargoHash = "sha256-EAyLg1q1R8mXP6gG/TrpjYrwhp6TJrrrU6Dfmz7W0zA=";
19+
20+
passthru.updateScript = nix-update-script { };
21+
22+
nativeBuildInputs = [ installShellFiles ];
23+
24+
postInstall = ''
25+
installShellCompletion --cmd ${finalAttrs.pname} \
26+
--bash <($out/bin/${finalAttrs.pname} completions bash) \
27+
--fish <($out/bin/${finalAttrs.pname} completions fish) \
28+
--zsh <($out/bin/${finalAttrs.pname} completions zsh)
29+
'';
30+
31+
meta = {
32+
description = "Kubectl version managing shim that invokes the correct kubectl version";
33+
homepage = "https://gitlab.com/cromulentbanana/korrect";
34+
license = lib.licenses.mit;
35+
# kubectl downloads don't work on x86_64-darwin yet, still investigating with upstream
36+
# https://gitlab.com/cromulentbanana/korrect/-/issues/14
37+
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
38+
maintainers = [ lib.maintainers.dwt ];
39+
};
40+
})

0 commit comments

Comments
 (0)