Commit b9b49e5e authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python310Packages.correctionlib: fix build

parent 0c9d2b67
Loading
Loading
Loading
Loading
+4 −17
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, cmake
, numpy
@@ -10,8 +9,9 @@
, wheel
, pybind11
, pydantic
, pytestCheckHook
, rich
, awkward
, pytestCheckHook
, scipy
, zlib
}:
@@ -19,27 +19,13 @@
buildPythonPackage rec {
  pname = "correctionlib";
  version = "2.3.3";
  format = "pyproject";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-4WXY7XfZVYaJD63y7fPB6tCsc+wGAsgnFlgtFbX5IK0=";
  };

  patches = [
    (fetchpatch {
      name = "ci-maintenance.patch";
      url = "https://github.com/cms-nanoAOD/correctionlib/commit/924031637b040f6e8e4930c46a9f7560c59db23d.patch";
      hash = "sha256-jq3ojMsO2Ex9om8tVpEY9uwwelXPzgQ+KCPN0bgda8w=";
      includes = [ "pyproject.toml" ];
    })
    (fetchpatch {
      name = "clean-up-build-dependencies.patch";
      url = "https://github.com/cms-nanoAOD/correctionlib/commit/c4fd64ca0e5ce806890e8f0ae8e792dcc4537d38.patch";
      hash = "sha256-8ID2jEnmfYmPxWMtRviBc3t1W4p3Y+lAzijFtYBEtyk=";
    })
  ];

  nativeBuildInputs = [
    cmake
    numpy
@@ -64,6 +50,7 @@ buildPythonPackage rec {
  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeCheckInputs = [
    awkward
    pytestCheckHook
    scipy
  ];