blob: 155238288146ad01eece74a199dc7b225be3a2d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "timoni";
version = "0.31.0";
src = fetchFromGitHub {
owner = "stefanprodan";
repo = "timoni";
tag = "v${finalAttrs.version}";
hash = "sha256-Is5IRJhzHcPv5pQ76CqiFSuEWO642BS36E6W1qckB9k=";
};
vendorHash = "sha256-kqmFRvVfohVBKeC1T13LVqX3AAbJT3aABhkMkLjFzAA=";
subPackages = [ "cmd/timoni" ];
nativeBuildInputs = [ installShellFiles ];
# Some tests require running Kubernetes instance
doCheck = false;
ldflags = [
"-s"
"-X main.VERSION=${finalAttrs.version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd timoni \
--bash <($out/bin/timoni completion bash) \
--fish <($out/bin/timoni completion fish) \
--zsh <($out/bin/timoni completion zsh)
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
homepage = "https://timoni.sh";
changelog = "https://github.com/stefanprodan/timoni/releases/tag/v${finalAttrs.version}";
description = "Package manager for Kubernetes, powered by CUE and inspired by Helm";
mainProgram = "timoni";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ votava ];
};
})
|