summary refs log tree commit diff
path: root/pkgs/development/libraries/science/math/p4est-sc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/science/math/p4est-sc/default.nix')
-rw-r--r--pkgs/development/libraries/science/math/p4est-sc/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/libraries/science/math/p4est-sc/default.nix b/pkgs/development/libraries/science/math/p4est-sc/default.nix
index eeb1d14b910..fbd9db6a419 100644
--- a/pkgs/development/libraries/science/math/p4est-sc/default.nix
+++ b/pkgs/development/libraries/science/math/p4est-sc/default.nix
@@ -5,7 +5,7 @@
 }:
 
 let
-  dbg = if debugEnable then "-dbg" else "";
+  dbg = lib.optionalString debugEnable "-dbg";
   debugEnable = p4est-sc-debugEnable;
   mpiSupport = p4est-sc-mpiSupport;
   isOpenmpi = mpiSupport && mpi.pname == "openmpi";
@@ -35,7 +35,7 @@ stdenv.mkDerivation {
   '';
   preConfigure = ''
     echo "2.8.0" > .tarball-version
-    ${if mpiSupport then "unset CC" else ""}
+    ${lib.optionalString mpiSupport "unset CC"}
   '';
 
   configureFlags = [ "--enable-pthread=-pthread" ]