2024-06-05 15:53:02 +00:00
|
|
|
{ lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
testers,
|
|
|
|
installShellFiles,
|
|
|
|
myks,
|
|
|
|
stdenv,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "myks";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.2.3";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mykso";
|
|
|
|
repo = "myks";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-sf+X+qafR0kpJTNIYoLr8q6stm+DgiD/yhVRyBRPA/s=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-aWXU2UG4/U8g4dgspjyIfTT2J++WoJlLHAo6K3CSLxc=";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
subPackages = ".";
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.version=${version}"
|
|
|
|
"-X=main.commit=nixpkg-${version}"
|
|
|
|
"-X=main.date=1970-01-01"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion { package = myks; };
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
|
|
installShellCompletion --cmd myks \
|
|
|
|
--bash <($out/bin/myks completion bash) \
|
|
|
|
--zsh <($out/bin/myks completion zsh) \
|
|
|
|
--fish <($out/bin/myks completion fish)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/mykso/myks/blob/v${version}/CHANGELOG.md";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Configuration framework for Kubernetes applications";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/mykso/myks";
|
2024-10-09 16:51:18 +00:00
|
|
|
maintainers = [
|
|
|
|
maintainers.kbudde
|
|
|
|
maintainers.zebradil
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
mainProgram = "myks";
|
|
|
|
};
|
|
|
|
}
|