File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
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.1" ;
13
+
14
+ src = fetchCrate {
15
+ inherit ( finalAttrs ) pname version ;
16
+ hash = "sha256-LS3pzDIb1G6lrP8lAG/Yd7Zcehjm5/TNEvTI+MnOomk=" ;
17
+ } ;
18
+ cargoHash = "sha256-vpjldD+aVVgCMQ/n+WZDPMMBRFPEeQZa09b45Q3m5UM=" ;
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
+ } )
You can’t perform that action at this time.
0 commit comments