-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222132 from dylanmtaylor/scalr-cli
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters