Skip to content

Commit e098367

Browse files
author
Jonathan Ringer
committed
hepmc3: 3.2.0 -> 3.2.2
1 parent a81e873 commit e098367

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

pkgs/development/libraries/physics/hepmc3/default.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@
33
let
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;
68
in
79

810
stdenv.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;

0 commit comments

Comments
 (0)