Skip to content

Commit

Permalink
Merge pull request #222132 from dylanmtaylor/scalr-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
NobbZ authored Mar 21, 2023
2 parents f3b33a0 + 6599eca commit a8cb031
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4124,6 +4124,12 @@
githubId = 6689924;
name = "David Terry";
};
dylanmtaylor = {
email = "dylan@dylanmtaylor.com";
github = "dylamtaylor";
githubId = 277927;
name = "Dylan Taylor";
};
dysinger = {
email = "tim@dysinger.net";
github = "dysinger";
Expand Down
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 @@ -25641,6 +25641,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 a8cb031

Please sign in to comment.