1 { lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
7 src = fetchFromGitHub {
11 hash = "sha256-lR16M8TAP0ilvcrA9YjVoZMrsi+kwEFKx5Fd3birHHM=";
14 subPackages = [ "./" ];
18 nativeBuildInputs = [ installShellFiles ];
20 doInstallCheck = true;
21 installCheckPhase = ''
22 $out/bin/k6 version | grep ${version} > /dev/null
25 postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
26 installShellCompletion --cmd k6 \
27 --bash <($out/bin/k6 completion bash) \
28 --fish <($out/bin/k6 completion fish) \
29 --zsh <($out/bin/k6 completion zsh)
33 description = "A modern load testing tool, using Go and JavaScript";
35 homepage = "https://k6.io/";
36 changelog = "https://github.com/grafana/k6/releases/tag/v${version}";
37 license = licenses.agpl3Plus;
38 maintainers = with maintainers; [ offline bryanasdev000 kashw2 ];