2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
deprecated,
|
|
|
|
fetchPypi,
|
|
|
|
hatch-vcs,
|
|
|
|
hatchling,
|
|
|
|
hepunits,
|
|
|
|
pandas,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
tabulate,
|
2022-04-03 18:54:34 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "particle";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.24.0";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
2022-04-03 18:54:34 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-irS13UVHui2ug1SVWkNSEIkqV13/RvMjysbPQGALl2o=";
|
2022-04-03 18:54:34 +00:00
|
|
|
};
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Disable benchmark tests, so we won't need pytest-benchmark and pytest-cov
|
|
|
|
# as dependencies
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"--benchmark-disable",' ""
|
|
|
|
'';
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
nativeBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
2022-04-03 18:54:34 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
2023-10-09 19:29:22 +00:00
|
|
|
deprecated
|
2022-04-03 18:54:34 +00:00
|
|
|
hepunits
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
tabulate
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "particle" ];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = [ "tests/particle/test_performance.py" ];
|
2022-04-03 18:54:34 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Package to deal with particles, the PDG particle data table and others";
|
2022-04-03 18:54:34 +00:00
|
|
|
homepage = "https://github.com/scikit-hep/particle";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/scikit-hep/particle/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
2022-04-03 18:54:34 +00:00
|
|
|
};
|
|
|
|
}
|