Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.1"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "cms-nanoAOD"; 34 repo = "correctionlib"; 35 rev = "refs/tags/v${version}"; 36 hash = "sha256-mfNSETMjhLoa3MK7zPggz568j1T6ay42cKa1GGKKfT8="; 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 meta = { 68 description = "Provides a well-structured JSON data format for a wide variety of ad-hoc correction factors encountered in a typical HEP analysis"; 69 mainProgram = "correction"; 70 homepage = "https://cms-nanoaod.github.io/correctionlib/"; 71 changelog = "https://github.com/cms-nanoAOD/correctionlib/releases/tag/v${version}"; 72 license = with lib.licenses; [ bsd3 ]; 73 maintainers = with lib.maintainers; [ veprbl ]; 74 }; 75}