Unverified Commit f404c776 authored by Nikolay Korotkiy's avatar Nikolay Korotkiy Committed by GitHub
Browse files

kluctl: 2.26.0 -> 2.27.0 (#422196)

parents cec9a164 79320c69
Loading
Loading
Loading
Loading
+28 −17
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildGoModule,
  buildPackages,
  fetchFromGitHub,
  installShellFiles,
  testers,
  makeWrapper,
  python310,
  kluctl,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "kluctl";
  version = "2.26.0";
  version = "2.27.0";

  src = fetchFromGitHub {
    owner = "kluctl";
    repo = "kluctl";
    rev = "v${version}";
    hash = "sha256-qtntImc+fiRPMUHVM4A8d2e17zklV47CJ10M9A8oa7k=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-m/bfZb+sp0gqxfMdBr/gAOxfYHdrPwKRcJAqprkAkQE=";
  };

  subPackages = [ "cmd" ];

  vendorHash = "sha256-89VEYX8xBdV36hHNIaRP8JoXTEGXmgzL7iL/Y4+1mzA=";
  vendorHash = "sha256-TKMMMZ+8bv5kKgrHIp3CXmt4tpi5VejPpXv/oiX4M3c=";

  ldflags = [
    "-s"
    "-w"
    "-X main.version=v${version}"
    "-X main.version=v${finalAttrs.version}"
  ];

  # Depends on docker
  doCheck = false;

  nativeBuildInputs = [
    installShellFiles
    makeWrapper
  ];

  passthru.tests.version = testers.testVersion {
    package = kluctl;
    version = "v${version}";
    package = finalAttrs.finalPackage;
    version = "v${finalAttrs.version}";
  };

  postInstall = ''
  postInstall =
    let
      emulator = stdenv.hostPlatform.emulator buildPackages;
    in
    ''
      mv $out/bin/{cmd,kluctl}
      wrapProgram $out/bin/kluctl \
        --set KLUCTL_USE_SYSTEM_PYTHON 1 \
        --prefix PATH : '${lib.makeBinPath [ python310 ]}'
      installShellCompletion --cmd kluctl \
        --bash <(${emulator} $out/bin/kluctl completion bash) \
        --fish <(${emulator} $out/bin/kluctl completion fish) \
        --zsh  <(${emulator} $out/bin/kluctl completion zsh)
    '';

  meta = with lib; {
  meta = {
    description = "Missing glue to put together large Kubernetes deployments";
    mainProgram = "kluctl";
    homepage = "https://kluctl.io/";
    license = licenses.asl20;
    maintainers = with maintainers; [
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [
      sikmir
      netthier
    ];
  };
}
})