chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / gl / glasskube / package.nix
blobf4b03a4b8d27b8f5bbeb903a48d2426b20d60105
1 { lib
2 , buildGo123Module
3 , buildNpmPackage
4 , fetchFromGitHub
5 , nix-update-script
6 , installShellFiles
7 , versionCheckHook
8 }:
10 let
11   version = "0.23.0";
12   gitSrc = fetchFromGitHub {
13     owner = "glasskube";
14     repo = "glasskube";
15     rev = "refs/tags/v${version}";
16     hash = "sha256-X9XXQ/Ke3toXLIkSCzGrypd1lKDfslpJ96zmDHBDbl8=";
17   };
18   web-bundle = buildNpmPackage rec {
19     inherit version;
20     pname = "glasskube-web-bundle";
22     src = gitSrc;
24     npmDepsHash = "sha256-9BicZfnrJEFrtaJ0uGmLnnY99KplnL8qdmG5FMo70uI=";
26     dontNpmInstall = true;
28     installPhase = ''
29       runHook preInstall
31       mkdir $out
32       mv internal/web/root/static/bundle $out
34       runHook postInstall
35     '';
36   };
38 in buildGo123Module rec {
39   inherit version;
40   pname = "glasskube";
42   src = gitSrc;
44   vendorHash = "sha256-xpN/5VmRPFQegP+ORpb875N/+AKgxiqyZWk4Px+SCZ4=";
46   CGO_ENABLED = 0;
48   ldflags = [
49     "-s"
50     "-w"
51     "-X github.com/glasskube/glasskube/internal/config.Version=${version}"
52     "-X github.com/glasskube/glasskube/internal/config.Commit=${src.rev}"
53   ];
55   subPackages = [ "cmd/glasskube" "cmd/package-operator" ];
57   nativeBuildInputs = [ installShellFiles ];
58   nativeCheckInputs = [ versionCheckHook ];
59   doInstallCheck = true;
61   preBuild = ''
62     cp -r ${web-bundle}/bundle internal/web/root/static/bundle
63   '';
65   postInstall = ''
66     # Completions
67     installShellCompletion --cmd glasskube \
68       --bash <($out/bin/glasskube completion bash) \
69       --fish <($out/bin/glasskube completion fish) \
70       --zsh <($out/bin/glasskube completion zsh)
71   '';
73   passthru.updateScript = nix-update-script { };
75   meta = with lib; {
76     description =
77       "The missing Package Manager for Kubernetes featuring a GUI and a CLI";
78     homepage = "https://github.com/glasskube/glasskube";
79     changelog =
80       "https://github.com/glasskube/glasskube/releases/tag/v${version}";
81     maintainers = with maintainers; [ jakuzure ];
82     license = licenses.asl20;
83     mainProgram = "glasskube";
84   };