Skip to content

Commit 2fb6098

Browse files
authored
kconf: refactor (#345495)
2 parents ab0bdd5 + 84baefd commit 2fb6098

File tree

3 files changed

+47
-29
lines changed

3 files changed

+47
-29
lines changed

pkgs/applications/networking/cluster/kconf/default.nix

Lines changed: 0 additions & 27 deletions
This file was deleted.

pkgs/by-name/kc/kconf/package.nix

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
installShellFiles,
6+
stdenv,
7+
}:
8+
buildGoModule rec {
9+
pname = "kconf";
10+
version = "2.0.0";
11+
12+
src = fetchFromGitHub {
13+
owner = "particledecay";
14+
repo = "kconf";
15+
rev = "v${version}";
16+
sha256 = "sha256-bLyLXkXOZRFaplv5sY0TgFffvbA3RUwz6b+7h3MN7kA=";
17+
};
18+
19+
vendorHash = "sha256-REguLiYlcC2Q6ao2oMl92/cznW+E8MO2UGhQKRXZ1vQ=";
20+
21+
ldflags = [
22+
"-s"
23+
"-w"
24+
"-X github.com/particledecay/kconf/build.Version=${version}"
25+
];
26+
27+
nativeBuildInputs = [ installShellFiles ];
28+
29+
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
30+
installShellCompletion --cmd kconf \
31+
--bash <($out/bin/kconf completion bash) \
32+
--fish <($out/bin/kconf completion fish) \
33+
--zsh <($out/bin/kconf completion zsh)
34+
'';
35+
36+
meta = with lib; {
37+
description = "Opinionated command line tool for managing multiple kubeconfigs";
38+
mainProgram = "kconf";
39+
homepage = "https://github.com/particledecay/kconf";
40+
license = licenses.mit;
41+
maintainers = with maintainers; [
42+
thmzlt
43+
sailord
44+
vinetos
45+
];
46+
};
47+
}

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30440,8 +30440,6 @@ with pkgs;
3044030440

3044130441
k3sup = callPackage ../applications/networking/cluster/k3sup { };
3044230442

30443-
kconf = callPackage ../applications/networking/cluster/kconf { };
30444-
3044530443
kail = callPackage ../tools/networking/kail { };
3044630444

3044730445
kapitonov-plugins-pack = callPackage ../applications/audio/kapitonov-plugins-pack { };

0 commit comments

Comments
 (0)