2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonAtLeast
|
|
|
|
, buildPythonPackage
|
|
|
|
, importlib-resources
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, setuptools-scm
|
2022-12-28 21:21:41 +00:00
|
|
|
, pythonOlder
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scikit-hep-testdata";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.4.31";
|
2021-06-04 09:07:49 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-/CUBRRezm84yAqnEVAC89vKIpALnvSkoSKBCmX84S0w=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
requests
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals (!pythonAtLeast "3.9") [
|
2022-12-28 21:21:41 +00:00
|
|
|
importlib-resources
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
SKHEP_DATA = 1; # install the actual root files
|
|
|
|
|
|
|
|
doCheck = false; # tests require networking
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"skhep_testdata"
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/scikit-hep/scikit-hep-testdata";
|
|
|
|
description = "A common package to provide example files (e.g., ROOT) for testing and developing packages against";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/scikit-hep/scikit-hep-testdata/releases/tag/v${version}";
|
2021-06-04 09:07:49 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|