at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 pkg-config, 8 rustc, 9 rustPlatform, 10 11 # tests 12 numpy, 13 pytestCheckHook, 14 pytest-benchmark, 15 pytest-rerunfailures, 16}: 17 18buildPythonPackage rec { 19 pname = "gilknocker"; 20 version = "0.4.1.post6"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "milesgranger"; 25 repo = "gilknocker"; 26 tag = "v${version}"; 27 hash = "sha256-jJOI7hlm6kcqfBbM56y5mKD+lJe0g+qAQpDF7ePM+GM="; 28 }; 29 30 cargoDeps = rustPlatform.fetchCargoVendor { 31 inherit pname version src; 32 hash = "sha256-cUv0CT8d6Nxjzh/S/hY9jcpeFX/5KvBxSkqOkt4htyU="; 33 }; 34 35 nativeBuildInputs = 36 with rustPlatform; 37 [ 38 cargoSetupHook 39 maturinBuildHook 40 ] 41 ++ [ 42 pkg-config 43 rustc 44 ]; 45 46 pythonImportsCheck = [ 47 "gilknocker" 48 ]; 49 50 nativeCheckInputs = [ 51 numpy 52 pytestCheckHook 53 pytest-benchmark 54 pytest-rerunfailures 55 ]; 56 57 pytestFlags = [ "--benchmark-disable" ]; 58 59 meta = { 60 description = "Knock on the Python GIL, determine how busy it is"; 61 homepage = "https://github.com/milesgranger/gilknocker"; 62 changelog = "https://github.com/milesgranger/gilknocker/releases/tag/v${version}"; 63 license = with lib.licenses; [ 64 mit 65 unlicense 66 ]; 67 maintainers = with lib.maintainers; [ daspk04 ]; 68 }; 69}