Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
993 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
buildGoModule rec {
pname = "usacloud";
version = "1.16.1";
src = fetchFromGitHub {
owner = "sacloud";
repo = "usacloud";
tag = "v${version}";
hash = "sha256-+aFtj9sJIiBakWcOA4hJ9yoPPBsKC+3xCWFNAXNVGQQ=";
};
vendorHash = "sha256-MWemCBnMtPnVK5ZXLtJdymWVTnYRXr8EkK08Atdi1Nc=";
ldflags = [
"-s"
"-w"
"-X=github.com/sacloud/usacloud/pkg/version.Revision=${src.rev}"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI client for the Sakura Cloud";
homepage = "https://github.com/sacloud/usacloud";
changelog = "https://github.com/sacloud/usacloud/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "usacloud";
};
}