mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
42 lines
997 B
Nix
42 lines
997 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "scalr-cli";
|
|
version = "0.15.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Scalr";
|
|
repo = "scalr-cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-RXfUlpwlDNAZRJTbbE+n8mReVyrWxUsWkOGaaALz0Q4=";
|
|
};
|
|
|
|
vendorHash = "sha256-0p4f+KKD04IFAUQG8F3b+2sx9suYemt3wbgSNNOOIlk=";
|
|
|
|
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 = "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";
|
|
};
|
|
}
|