mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
91bc672ca1
k6: added kashw2 maintainer
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "k6";
|
|
version = "0.46.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "grafana";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-4ucnq/FTvdDpzf1RWRY+U5A+BCaaQWMTEaZtmU0JD90=";
|
|
};
|
|
|
|
subPackages = [ "./" ];
|
|
|
|
vendorHash = null;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
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 = "A modern load testing tool, using Go and JavaScript";
|
|
homepage = "https://k6.io/";
|
|
changelog = "https://github.com/grafana/k6/releases/tag/v${version}";
|
|
license = licenses.agpl3Plus;
|
|
maintainers = with maintainers; [ offline bryanasdev000 kashw2 ];
|
|
};
|
|
}
|