File tree Expand file tree Collapse file tree
pkgs/development/libraries/physics/hepmc3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33let
44 pythonVersion = with stdenv . lib . versions ; "${ major python . version } ${ minor python . version } " ;
55 withPython = python != null ;
6+ # ensure that root is built with the same python interpreter, as it links against numpy
7+ root_py = if withPython then root . override { inherit python ; } else root ;
68in
79
810stdenv . mkDerivation rec {
911 pname = "hepmc3" ;
10- version = "3.2.0 " ;
12+ version = "3.2.2 " ;
1113
1214 src = fetchurl {
1315 url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC3-${ version } .tar.gz" ;
14- sha256 = "1z491x3blqs0a2jxmhzhmh4kqdw3ddcbvw69gidg4w6icdvkhcpi " ;
16+ sha256 = "0h9dbsbbf3y7iia27ms9cy4pfk2yyrkdnxcqsbvkhkl0izvv930f " ;
1517 } ;
1618
1719 nativeBuildInputs = [ cmake ] ;
18- buildInputs = [ root ]
20+ buildInputs = [ root_py ]
1921 ++ stdenv . lib . optional withPython python ;
2022
2123 cmakeFlags = [
@@ -31,6 +33,12 @@ stdenv.mkDerivation rec {
3133 --replace 'readlink' '${ coreutils } /bin/readlink'
3234 '' ;
3335
36+ doInstallCheck = withPython ;
37+ # prevent nix from trying to dereference a null python
38+ installCheckPhase = stdenv . lib . optionalString withPython ''
39+ PYTHONPATH=${ placeholder "out" } /${ python . sitePackages } python -c 'import pyHepMC3'
40+ '' ;
41+
3442 meta = with stdenv . lib ; {
3543 description = "The HepMC package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation" ;
3644 license = licenses . gpl3 ;
You can’t perform that action at this time.
0 commit comments