mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
go,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
installShellFiles,
|
|
testers,
|
|
updatecli,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "updatecli";
|
|
version = "0.82.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "updatecli";
|
|
repo = "updatecli";
|
|
rev = "v${version}";
|
|
hash = "sha256-kNc+Z+v4fvuWO/Ibr9VOekMDT39YEwA/fReP+e3C74U=";
|
|
};
|
|
|
|
vendorHash = "sha256-fnx0EAGxau0+ktnuUb8ljolNAlwu2595FMjsDbM2MiY=";
|
|
|
|
# tests require network access
|
|
doCheck = false;
|
|
|
|
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 = ''
|
|
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 ];
|
|
};
|
|
}
|