Files
nixpkgs/pkgs/by-name/ci/civo/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "civo";
version = "1.4.3";
src = fetchFromGitHub {
owner = "civo";
repo = "cli";
rev = "v${version}";
hash = "sha256-0F8RF2vbuuLv39yIYQk7TdBw8CImcnMFQ9r+GSHGGiY=";
};
vendorHash = "sha256-TsaGXDUTvTsfDIBhM9+JwL2swEw/qSivn3NTA0tWkZw=";
nativeBuildInputs = [ installShellFiles ];
env.CGO_ENABLED = 0;
# Some lint checks fail
doCheck = false;
ldflags = [
"-s"
"-X github.com/civo/cli/common.VersionCli=${version}"
"-X github.com/civo/cli/common.CommitCli=${src.rev}"
"-X github.com/civo/cli/common.DateCli=unknown"
];
doInstallCheck = false;
postInstall = ''
mv $out/bin/cli $out/bin/civo
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd civo \
--bash <($out/bin/civo completion bash) \
--fish <($out/bin/civo completion fish) \
--zsh <($out/bin/civo completion zsh)
'';
meta = {
description = "CLI for interacting with Civo resources";
mainProgram = "civo";
homepage = "https://github.com/civo/cli";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
techknowlogick
rytswd
];
};
}