Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestrunner 5, pytest 6, py-cpuinfo 7, pythonOlder 8, pathlib 9, statistics 10}: 11 12buildPythonPackage rec { 13 pname = "pytest-benchmark"; 14 version = "3.2.2"; 15 16 src = fetchFromGitHub { 17 owner = "ionelmc"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "1hslzzinpwc1zqhbpllqh3sllmiyk69pcycl7ahr0rz3micgwczj"; 21 }; 22 23 propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optional (pythonOlder "3.4") [ pathlib statistics ]; 24 25 meta = { 26 description = "Py.test fixture for benchmarking code"; 27 homepage = https://github.com/ionelmc/pytest-benchmark; 28 license = lib.licenses.bsd2; 29 maintainers = with lib.maintainers; [ costrouc ]; 30 }; 31}