Skip to content

Commit

Permalink
scalr-cli: init at 0.14.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmtaylor committed Mar 20, 2023
1 parent f2f7589 commit 6599eca
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions pkgs/tools/admin/scalr-cli/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:

buildGoModule rec {
pname = "scalr-cli";
version = "0.14.5";

src = fetchFromGitHub {
owner = "Scalr";
repo = "scalr-cli";
rev = "v${version}";
hash = "sha256-X/fZDM1OYw1a0la8os9TFUrl1h5BnO+C40h2XH32vmw=";
};

vendorHash = "sha256-EdDhq6LnxagutxjiOoYElhHVnSKhr/Ekt928gSooPYY=";

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 = with lib; {
description = "A 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 = licenses.asl20;
maintainers = with maintainers; [ dylanmtaylor ];
mainProgram = "scalr";
platforms = platforms.unix;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25639,6 +25639,8 @@ with pkgs;

sampler = callPackage ../applications/misc/sampler { };

scalr-cli = callPackage ../tools/admin/scalr-cli { };

shairplay = callPackage ../servers/shairplay { avahi = avahi-compat; };

shairport-sync = callPackage ../servers/shairport-sync { };
Expand Down

0 comments on commit 6599eca

Please sign in to comment.