Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

70 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
pkg-config,
rustc,
rustPlatform,
# tests
numpy,
pytestCheckHook,
pytest-benchmark,
pytest-rerunfailures,
}:
buildPythonPackage rec {
pname = "gilknocker";
version = "0.4.1.post6";
pyproject = true;
src = fetchFromGitHub {
owner = "milesgranger";
repo = "gilknocker";
tag = "v${version}";
hash = "sha256-jJOI7hlm6kcqfBbM56y5mKD+lJe0g+qAQpDF7ePM+GM=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-cUv0CT8d6Nxjzh/S/hY9jcpeFX/5KvBxSkqOkt4htyU=";
};
nativeBuildInputs =
with rustPlatform;
[
cargoSetupHook
maturinBuildHook
]
++ [
pkg-config
rustc
];
pythonImportsCheck = [
"gilknocker"
];
nativeCheckInputs = [
numpy
pytestCheckHook
pytest-benchmark
pytest-rerunfailures
];
pytestFlags = [ "--benchmark-disable" ];
meta = {
description = "Knock on the Python GIL, determine how busy it is";
homepage = "https://github.com/milesgranger/gilknocker";
changelog = "https://github.com/milesgranger/gilknocker/releases/tag/v${version}";
license = with lib.licenses; [
mit
unlicense
];
maintainers = with lib.maintainers; [ daspk04 ];
};
}