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
45 lines
1004 B
Nix
45 lines
1004 B
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "scalr-cli";
|
|
version = "0.17.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Scalr";
|
|
repo = "scalr-cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-W8Ug/Y5vF604qT9U2SWfYQZMUP4JOFdWAQNU3Yiu5mE=";
|
|
};
|
|
|
|
vendorHash = "sha256-TUf+0Z0yBDOpzMuETn+FCAPXWvQltjRhwQ3Xz0X6YOI=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
preConfigure = ''
|
|
# Set the version.
|
|
substituteInPlace main.go --replace '"0.0.0"' '"${version}"'
|
|
'';
|
|
|
|
postInstall = ''
|
|
mv $out/bin/cli $out/bin/scalr
|
|
'';
|
|
|
|
doCheck = false; # Skip tests as they require creating actual Scalr resources.
|
|
|
|
meta = {
|
|
description = "Command-line tool that communicates directly with the Scalr API";
|
|
homepage = "https://github.com/Scalr/scalr-cli";
|
|
changelog = "https://github.com/Scalr/scalr-cli/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ dylanmtaylor ];
|
|
mainProgram = "scalr";
|
|
};
|
|
}
|