diff --git a/packages/nest/package.py b/packages/nest/package.py
index 0b3f42d96a04ea84d1f1f1abb891b1221f606c2a..f88e8f3ef172e99f4c8a290ccfcb698e4b4e9a86 100644
--- a/packages/nest/package.py
+++ b/packages/nest/package.py
@@ -149,7 +149,7 @@ class Nest(CMakePackage):
         else:
             configure_args.append("--without-optimize")
 
-        if 'mpi' in spec:
+        if '+mpi' in spec:
             env['CC'] = spec['mpi'].mpicc
             env['CXX'] = spec['mpi'].mpicxx
             env['F77'] = spec['mpi'].mpif77