Unverified Commit 2fb6098c authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

kconf: refactor (#345495)

parents ab0bdd52 84baefda
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub }:

{
  lib,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  stdenv,
}:
buildGoModule rec {
  pname = "kconf";
  version = "2.0.0";
@@ -14,14 +19,29 @@ buildGoModule rec {
  vendorHash = "sha256-REguLiYlcC2Q6ao2oMl92/cznW+E8MO2UGhQKRXZ1vQ=";

  ldflags = [
      "-s" "-w" "-X github.com/particledecay/kconf/build.Version=${version}"
    "-s"
    "-w"
    "-X github.com/particledecay/kconf/build.Version=${version}"
  ];

  nativeBuildInputs = [ installShellFiles ];

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd kconf \
      --bash <($out/bin/kconf completion bash) \
      --fish <($out/bin/kconf completion fish) \
      --zsh <($out/bin/kconf completion zsh)
  '';

  meta = with lib; {
    description = "Opinionated command line tool for managing multiple kubeconfigs";
    mainProgram = "kconf";
    homepage = "https://github.com/particledecay/kconf";
    license = licenses.mit;
    maintainers = with maintainers; [ thmzlt ];
    maintainers = with maintainers; [
      thmzlt
      sailord
      vinetos
    ];
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -30440,8 +30440,6 @@ with pkgs;
  k3sup = callPackage ../applications/networking/cluster/k3sup { };
  kconf = callPackage ../applications/networking/cluster/kconf { };
  kail = callPackage ../tools/networking/kail {  };
  kapitonov-plugins-pack = callPackage ../applications/audio/kapitonov-plugins-pack { };