Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
75 lines
1.7 KiB
Nix
75 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
kargo,
|
|
stdenv,
|
|
testers,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "kargo";
|
|
version = "1.7.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "akuity";
|
|
repo = "kargo";
|
|
tag = "v${version}";
|
|
hash = "sha256-HYTtZ2+eZ5DXXif26t7Q9RnsIRhIxJ88YZHQFNN22Vo=";
|
|
};
|
|
|
|
vendorHash = "sha256-zo3aEs0xrWbjj5nCtZ1GEfAYXy2cnaUCUbN5bjYFZ+Y=";
|
|
|
|
subPackages = [ "cmd/cli" ];
|
|
|
|
ldflags =
|
|
let
|
|
package_url = "github.com/akuity/kargo/pkg/x/version";
|
|
in
|
|
[
|
|
"-s"
|
|
"-w"
|
|
"-X ${package_url}.version=${version}"
|
|
"-X ${package_url}.buildDate=1970-01-01T00:00:00Z"
|
|
"-X ${package_url}.gitCommit=${src.rev}"
|
|
"-X ${package_url}.gitTreeState=clean"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/bin
|
|
install -Dm755 "$GOPATH/bin/cli" -T $out/bin/kargo
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = kargo;
|
|
command = "HOME=$TMPDIR ${meta.mainProgram} version --client";
|
|
};
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd kargo \
|
|
--bash <($out/bin/kargo completion bash) \
|
|
--fish <($out/bin/kargo completion fish) \
|
|
--zsh <($out/bin/kargo completion zsh)
|
|
'';
|
|
|
|
meta = {
|
|
description = "Application lifecycle orchestration";
|
|
mainProgram = "kargo";
|
|
downloadPage = "https://github.com/akuity/kargo";
|
|
homepage = "https://kargo.akuity.io";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
bbigras
|
|
];
|
|
};
|
|
}
|