From cfc44b5d41f3b6af18c4af5e65ec4fd19e9b79cf Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 3 Aug 2023 00:03:32 +0200 Subject: [PATCH] pythonPackages.meep: use mpiCheckPhaseHook --- pkgs/development/python-modules/meep/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/meep/default.nix b/pkgs/development/python-modules/meep/default.nix index 021121a44ac2..df0dd2cb1bb1 100644 --- a/pkgs/development/python-modules/meep/default.nix +++ b/pkgs/development/python-modules/meep/default.nix @@ -4,6 +4,7 @@ , fetchFromGitHub , autoreconfHook , pkg-config +, mpiCheckPhaseHook , gfortran , mpi , blas @@ -108,16 +109,12 @@ buildPythonPackage rec { errors can be caught. */ doCheck = true; + nativeCheckInputs = [ mpiCheckPhaseHook openssh ]; checkPhase = '' - export PATH=$PATH:${openssh}/bin + runHook preCheck + export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" - export OMP_NUM_THREADS=1 - - # Fix to make mpich run in a sandbox - export HYDRA_IFACE=lo - export OMPI_MCA_rmaps_base_oversubscribe=1 - # Generate a python test script cat > test.py << EOF import meep as mp @@ -139,6 +136,8 @@ buildPythonPackage rec { EOF ${mpi}/bin/mpiexec -np 2 python3 test.py + + runHook postCheck ''; meta = with lib; {