nixpkgs/pkgs/development/tools/k6/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2021-12-06 21:41:26 +00:00
buildGoModule rec {
2019-03-20 11:42:13 +00:00
pname = "k6";
2024-08-13 14:48:17 +00:00
version = "0.53.0";
src = fetchFromGitHub {
2021-12-06 21:41:26 +00:00
owner = "grafana";
2019-03-20 11:42:13 +00:00
repo = pname;
rev = "v${version}";
2024-08-13 14:48:17 +00:00
hash = "sha256-mh7Y7AGNvXRD2MJN8UOCSDNWJZlnu9hBdeDePfce9g8=";
};
subPackages = [ "./" ];
2023-04-20 18:09:49 +00:00
vendorHash = null;
2021-12-06 21:41:26 +00:00
nativeBuildInputs = [ installShellFiles ];
2021-12-06 21:41:26 +00:00
doInstallCheck = true;
installCheckPhase = ''
$out/bin/k6 version | grep ${version} > /dev/null
'';
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
installShellCompletion --cmd k6 \
--bash <($out/bin/k6 completion bash) \
--fish <($out/bin/k6 completion fish) \
--zsh <($out/bin/k6 completion zsh)
'';
meta = with lib; {
description = "Modern load testing tool, using Go and JavaScript";
mainProgram = "k6";
2020-05-24 17:06:23 +00:00
homepage = "https://k6.io/";
2021-12-06 21:41:26 +00:00
changelog = "https://github.com/grafana/k6/releases/tag/v${version}";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ offline bryanasdev000 kashw2 ];
};
}