Files
nixpkgs/pkgs/by-name/up/updatecli/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

71 lines
1.8 KiB
Nix

{
lib,
stdenv,
go,
buildGoModule,
fetchFromGitHub,
nix-update-script,
installShellFiles,
testers,
updatecli,
}:
buildGoModule rec {
pname = "updatecli";
version = "0.105.0";
src = fetchFromGitHub {
owner = "updatecli";
repo = "updatecli";
rev = "v${version}";
hash = "sha256-VE5sU3R9dVi97fyc+bafZUz/9v6iPfw3MRsjCm8ifuo=";
};
vendorHash = "sha256-HdeFXQGisz0q/ZZv1UMo9ig9zBzH6Uyap8c1vl4zl5w=";
# tests require network access
doCheck = false;
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/updatecli/updatecli/pkg/core/version.BuildTime=unknown"
''-X "github.com/updatecli/updatecli/pkg/core/version.GoVersion=go version go${lib.getVersion go}"''
"-X github.com/updatecli/updatecli/pkg/core/version.Version=${version}"
];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = updatecli;
command = "updatecli version";
};
};
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd updatecli \
--bash <($out/bin/updatecli completion bash) \
--fish <($out/bin/updatecli completion fish) \
--zsh <($out/bin/updatecli completion zsh)
$out/bin/updatecli man > updatecli.1
installManPage updatecli.1
'';
meta = with lib; {
description = "Declarative Dependency Management tool";
longDescription = ''
Updatecli is a command-line tool used to define and apply update strategies.
'';
homepage = "https://www.updatecli.io";
changelog = "https://github.com/updatecli/updatecli/releases/tag/${src.rev}";
license = licenses.asl20;
mainProgram = "updatecli";
maintainers = with maintainers; [ croissong ];
};
}