1{ 2 lib, 3 attrs, 4 buildPythonPackage, 5 deprecated, 6 fetchFromGitHub, 7 fetchPypi, 8 hatch-vcs, 9 hatchling, 10 hepunits, 11 pandas, 12 pytestCheckHook, 13 pythonOlder, 14 setuptools-scm, 15 tabulate, 16}: 17 18buildPythonPackage rec { 19 pname = "particle"; 20 version = "0.24.0"; 21 format = "pyproject"; 22 23 disabled = pythonOlder "3.9"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-irS13UVHui2ug1SVWkNSEIkqV13/RvMjysbPQGALl2o="; 28 }; 29 30 postPatch = '' 31 # Disable benchmark tests, so we won't need pytest-benchmark and pytest-cov 32 # as dependencies 33 substituteInPlace pyproject.toml \ 34 --replace '"--benchmark-disable",' "" 35 ''; 36 37 nativeBuildInputs = [ 38 hatch-vcs 39 hatchling 40 ]; 41 42 propagatedBuildInputs = [ 43 attrs 44 deprecated 45 hepunits 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 tabulate 51 pandas 52 ]; 53 54 pythonImportsCheck = [ "particle" ]; 55 56 disabledTestPaths = [ "tests/particle/test_performance.py" ]; 57 58 meta = with lib; { 59 description = "Package to deal with particles, the PDG particle data table and others"; 60 homepage = "https://github.com/scikit-hep/particle"; 61 changelog = "https://github.com/scikit-hep/particle/releases/tag/v${version}"; 62 license = licenses.bsd3; 63 maintainers = with maintainers; [ doronbehar ]; 64 }; 65}