555cd8a8f9
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
testers,
|
|
installShellFiles,
|
|
myks,
|
|
stdenv,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "myks";
|
|
version = "4.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mykso";
|
|
repo = "myks";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-sf+X+qafR0kpJTNIYoLr8q6stm+DgiD/yhVRyBRPA/s=";
|
|
};
|
|
|
|
vendorHash = "sha256-aWXU2UG4/U8g4dgspjyIfTT2J++WoJlLHAo6K3CSLxc=";
|
|
|
|
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";
|
|
description = "Configuration framework for Kubernetes applications";
|
|
license = licenses.mit;
|
|
homepage = "https://github.com/mykso/myks";
|
|
maintainers = [
|
|
maintainers.kbudde
|
|
maintainers.zebradil
|
|
];
|
|
mainProgram = "myks";
|
|
};
|
|
}
|