diff --git a/pkgs/development/python-modules/correctionlib/default.nix b/pkgs/development/python-modules/correctionlib/default.nix index 0d40e8e3ab51..957f5da7ed79 100644 --- a/pkgs/development/python-modules/correctionlib/default.nix +++ b/pkgs/development/python-modules/correctionlib/default.nix @@ -2,15 +2,17 @@ lib, buildPythonPackage, fetchFromGitHub, - fetchpatch, # build-system - cmake, - scikit-build, - setuptools, - setuptools-scm, pybind11, + scikit-build-core, + setuptools-scm, + # nativeBuildInputs + cmake, + ninja, + + # buildInputs zlib, # dependencies @@ -19,7 +21,8 @@ pydantic, rich, - # checks + # tests + addBinToPathHook, awkward, pytestCheckHook, scipy, @@ -27,34 +30,28 @@ buildPythonPackage rec { pname = "correctionlib"; - version = "2.6.4"; + version = "2.7.0"; pyproject = true; src = fetchFromGitHub { owner = "cms-nanoAOD"; repo = "correctionlib"; tag = "v${version}"; - hash = "sha256-l+JjW/giGzU00z0jBN3D4KB/LjTIxeJb3CS+Ge0gbiA="; fetchSubmodules = true; + hash = "sha256-aLTeyDOo80p8xzl/IPnpT3BOjS2qOYn/Z7pidcLoEY8="; }; - patches = [ - # fix https://github.com/Tencent/rapidjson/issues/2277 - (fetchpatch { - url = "https://github.com/Tencent/rapidjson/pull/719.diff"; - hash = "sha256-xarSfi9o73KoJo0ijT0G8fyTSYVuY0+9rLEtfUwas0Q="; - extraPrefix = "rapidjson/"; - stripLen = 1; - }) + build-system = [ + pybind11 + scikit-build-core + setuptools-scm ]; - build-system = [ + nativeBuildInputs = [ cmake - scikit-build - setuptools - setuptools-scm - pybind11 + ninja ]; + dontUseCmakeConfigure = true; buildInputs = [ zlib ]; @@ -65,9 +62,10 @@ buildPythonPackage rec { rich ]; - dontUseCmakeConfigure = true; - nativeCheckInputs = [ + # One test requires running the produced `correctionlib` binary + addBinToPathHook + awkward pytestCheckHook scipy @@ -75,11 +73,6 @@ buildPythonPackage rec { pythonImportsCheck = [ "correctionlib" ]; - # One test requires running the produced `correctionlib` binary - preCheck = '' - export PATH=$out/bin:$PATH - ''; - meta = { description = "Provides a well-structured JSON data format for a wide variety of ad-hoc correction factors encountered in a typical HEP analysis"; mainProgram = "correction";