Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 80 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cmake, 8 scikit-build, 9 setuptools, 10 setuptools-scm, 11 pybind11, 12 13 zlib, 14 15 # dependencies 16 numpy, 17 packaging, 18 pydantic, 19 rich, 20 21 # checks 22 awkward, 23 pytestCheckHook, 24 scipy, 25}: 26 27buildPythonPackage rec { 28 pname = "correctionlib"; 29 version = "2.6.4"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "cms-nanoAOD"; 34 repo = "correctionlib"; 35 rev = "refs/tags/v${version}"; 36 hash = "sha256-l+JjW/giGzU00z0jBN3D4KB/LjTIxeJb3CS+Ge0gbiA="; 37 fetchSubmodules = true; 38 }; 39 40 build-system = [ 41 cmake 42 scikit-build 43 setuptools 44 setuptools-scm 45 pybind11 46 ]; 47 48 buildInputs = [ zlib ]; 49 50 dependencies = [ 51 numpy 52 packaging 53 pydantic 54 rich 55 ]; 56 57 dontUseCmakeConfigure = true; 58 59 nativeCheckInputs = [ 60 awkward 61 pytestCheckHook 62 scipy 63 ]; 64 65 pythonImportsCheck = [ "correctionlib" ]; 66 67 # One test requires running the produced `correctionlib` binary 68 preCheck = '' 69 export PATH=$out/bin:$PATH 70 ''; 71 72 meta = { 73 description = "Provides a well-structured JSON data format for a wide variety of ad-hoc correction factors encountered in a typical HEP analysis"; 74 mainProgram = "correction"; 75 homepage = "https://cms-nanoaod.github.io/correctionlib/"; 76 changelog = "https://github.com/cms-nanoAOD/correctionlib/releases/tag/v${version}"; 77 license = with lib.licenses; [ bsd3 ]; 78 maintainers = with lib.maintainers; [ veprbl ]; 79 }; 80}