at 24.05-pre 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, cmake 5, setuptools 6, setuptools-scm 7, numpy 8, pybind11 9, wheel 10, pytestCheckHook 11, pythonOlder 12, graphviz 13}: 14 15buildPythonPackage rec { 16 pname = "pyhepmc"; 17 version = "2.13.2"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "scikit-hep"; 24 repo = pname; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-M18Bq6WrAINpgPx5+uh8dufPBxIklRHpbBWUYMC8v10="; 27 fetchSubmodules = true; 28 }; 29 30 nativeBuildInputs = [ 31 cmake 32 setuptools 33 setuptools-scm 34 wheel 35 ]; 36 37 buildInputs = [ 38 pybind11 39 ]; 40 41 propagatedBuildInputs = [ 42 numpy 43 ]; 44 45 dontUseCmakeConfigure = true; 46 47 SETUPTOOLS_SCM_PRETEND_VERSION = version; 48 CMAKE_ARGS = [ "-DEXTERNAL_PYBIND11=ON" ]; 49 50 preBuild = '' 51 export CMAKE_BUILD_PARALLEL_LEVEL="$NIX_BUILD_CORES" 52 ''; 53 54 nativeCheckInputs = [ 55 graphviz 56 pytestCheckHook 57 ]; 58 59 pythonImportsCheck = [ "pyhepmc" ]; 60 61 meta = with lib; { 62 description = "Easy-to-use Python bindings for HepMC3"; 63 homepage = "https://github.com/scikit-hep/pyhepmc"; 64 changelog = "https://github.com/scikit-hep/pyhepmc/releases/tag/v${version}"; 65 license = licenses.bsd3; 66 maintainers = with maintainers; [ veprbl ]; 67 }; 68} 69