nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 48 lines 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5}: 6 7buildGoModule rec { 8 pname = "vegeta"; 9 version = "12.12.0"; 10 rev = "03ca49e9b419c106db29d687827c4c823d8b8ece"; 11 12 src = fetchFromGitHub { 13 owner = "tsenart"; 14 repo = "vegeta"; 15 rev = "v${version}"; 16 hash = "sha256-nTtQ/BB5rU+0k4dPRCmukCRNI0iFTjHIJiSTN0cNR+Q="; 17 }; 18 19 vendorHash = "sha256-0Ho1HYckFHaWEE6Ti3fIL/t0hBj5MnKOd4fOZx+LYiE="; 20 21 subPackages = [ "." ]; 22 23 ldflags = 24 (lib.mapAttrsToList (n: v: "-X main.${n}=${v}") { 25 Version = version; 26 Commit = rev; 27 Date = "1970-01-01T00:00:00Z"; 28 }) 29 ++ [ 30 "-s" 31 "-w" 32 "-extldflags '-static'" 33 ]; 34 35 meta = with lib; { 36 description = "Versatile HTTP load testing tool"; 37 longDescription = '' 38 Vegeta is a versatile HTTP load testing tool built out of a need to drill 39 HTTP services with a constant request rate. It can be used both as a 40 command line utility and a library. 41 ''; 42 homepage = "https://github.com/tsenart/vegeta/"; 43 changelog = "https://github.com/tsenart/vegeta/releases/tag/${src.rev}"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ mmahut ]; 46 mainProgram = "vegeta"; 47 }; 48}