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