-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdefault.nix
55 lines (45 loc) · 1.29 KB
/
default.nix
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
{
buildGo123Module,
fetchFromGitHub,
installShellFiles,
stdenv,
lib,
}:
buildGo123Module rec {
pname = "talhelper";
version = "3.0.19";
src = fetchFromGitHub {
owner = "budimanjojo";
repo = pname;
rev = "v${version}";
sha256 = "sha256-KNeZ5AzdVi+TS3azOzFNi7yQdv66M8MualhTa0oa9Yc=";
};
vendorHash = "sha256-b4R4BAwczsPUEI5BqwmecFchOEt/sy/E+9bQcqGC2fY=";
ldflags = [ "-s -w -X github.com/budimanjojo/talhelper/v3/cmd.version=v${version}" ];
doCheck = false; # no tests
subPackages = [
"."
"./cmd"
];
nativeBuildInputs = [ installShellFiles ];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/talhelper --version | grep ${version} > /dev/null
'';
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
for shell in bash fish zsh; do
$out/bin/talhelper completion $shell > talhelper.$shell
installShellCompletion talhelper.$shell
done
'';
meta = with lib; {
description = "A tool to help creating Talos kubernetes cluster";
mainProgram = "talhelper";
longDescription = ''
Talhelper is a helper tool to help creating Talos Linux cluster
in your GitOps repository.
'';
homepage = "https://github.com/budimanjojo/talhelper";
license = licenses.bsd3;
};
}