nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 44 lines 1.0 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5}: 6 7buildGoModule rec { 8 pname = "scalr-cli"; 9 version = "0.17.6"; 10 11 src = fetchFromGitHub { 12 owner = "Scalr"; 13 repo = "scalr-cli"; 14 rev = "v${version}"; 15 hash = "sha256-TcgNWtyXadbrE43ZmTLC+d9eXUzgp7zhHxjf2vTsuBk="; 16 }; 17 18 vendorHash = "sha256-TUf+0Z0yBDOpzMuETn+FCAPXWvQltjRhwQ3Xz0X6YOI="; 19 20 ldflags = [ 21 "-s" 22 "-w" 23 ]; 24 25 preConfigure = '' 26 # Set the version. 27 substituteInPlace main.go --replace '"0.0.0"' '"${version}"' 28 ''; 29 30 postInstall = '' 31 mv $out/bin/cli $out/bin/scalr 32 ''; 33 34 doCheck = false; # Skip tests as they require creating actual Scalr resources. 35 36 meta = { 37 description = "Command-line tool that communicates directly with the Scalr API"; 38 homepage = "https://github.com/Scalr/scalr-cli"; 39 changelog = "https://github.com/Scalr/scalr-cli/releases/tag/v${version}"; 40 license = lib.licenses.asl20; 41 maintainers = with lib.maintainers; [ dylanmtaylor ]; 42 mainProgram = "scalr"; 43 }; 44}