Commit 1dea6175 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

python3.pkgs.hepmc3: use pythonImportsCheck

Since we only depend on pythonImportsCheckHook when building with
Python, the pythonImportsCheck attribute will just be ignored when not
building with Python support.
parent cf91b242
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@ stdenv.mkDerivation rec {

  nativeBuildInputs = [
    cmake
  ];
  ]
  ++ lib.optional withPython python.pkgs.pythonImportsCheckHook;

  buildInputs = [
    root_py
@@ -50,11 +51,7 @@ stdenv.mkDerivation rec {
      --replace 'readlink' '${coreutils}/bin/readlink'
  '';

  doInstallCheck = withPython;
  # prevent nix from trying to dereference a null python
  installCheckPhase = lib.optionalString withPython ''
    PYTHONPATH=${placeholder "out"}/${python.sitePackages} python -c 'import pyHepMC3'
  '';
  pythonImportsCheck = [ "pyHepMC3" ];

  meta = with lib; {
    description = "The HepMC package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation";