summary refs log tree commit diff
path: root/pkgs/development/libraries/physics
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-05-09 13:44:39 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-09-03 10:55:15 -0400
commitd22be10e667d233fe38ae6b8f23dc8505798492b (patch)
tree57662d23e979b7bfb72f45cbc39e3eb6dfa3cd71 /pkgs/development/libraries/physics
parent3db3ae3700f6e3ced14cf33da05ae91a06d8e5bf (diff)
downloadnixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.tar
nixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.tar.gz
nixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.tar.bz2
nixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.tar.lz
nixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.tar.xz
nixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.tar.zst
nixpkgs-d22be10e667d233fe38ae6b8f23dc8505798492b.zip
geant4: refactor cmakeFlags to use lists
Diffstat (limited to 'pkgs/development/libraries/physics')
-rw-r--r--pkgs/development/libraries/physics/geant4/default.nix34
1 files changed, 16 insertions, 18 deletions
diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix
index 87af069c18a..8b3166cdea0 100644
--- a/pkgs/development/libraries/physics/geant4/default.nix
+++ b/pkgs/development/libraries/physics/geant4/default.nix
@@ -58,24 +58,22 @@ let
       inherit version src;
       name = "geant4-${version}";
 
-      multiThreadingFlag = if multiThreadingCapable then "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}" else "";
-
-      cmakeFlags = ''
-        ${multiThreadingFlag}
-        -DGEANT4_INSTALL_DATA=OFF
-        -DGEANT4_USE_GDML=${if enableGDML then "ON" else "OFF"}
-        -DGEANT4_USE_G3TOG4=${if enableG3toG4 then "ON" else "OFF"}
-        -DGEANT4_USE_QT=${if enableQT then "ON" else "OFF"}
-        -DGEANT4_USE_XM=${if enableXM then "ON" else "OFF"}
-        -DGEANT4_USE_OPENGL_X11=${if enableOpenGLX11 then "ON" else "OFF"}
-        -DGEANT4_USE_INVENTOR=${if enableInventor then "ON" else "OFF"}
-        -DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}
-        -DGEANT4_USE_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}
-        -DGEANT4_USE_SYSTEM_EXPAT=${if expat != null then "ON" else "OFF"}
-        -DGEANT4_USE_SYSTEM_ZLIB=${if zlib != null then "ON" else "OFF"}
-        -DINVENTOR_INCLUDE_DIR=${coin3d}/include
-        -DINVENTOR_LIBRARY_RELEASE=${coin3d}/lib/libCoin.so
-      '';
+      cmakeFlags = [
+        "-DGEANT4_INSTALL_DATA=OFF"
+        "-DGEANT4_USE_GDML=${if enableGDML then "ON" else "OFF"}"
+        "-DGEANT4_USE_G3TOG4=${if enableG3toG4 then "ON" else "OFF"}"
+        "-DGEANT4_USE_QT=${if enableQT then "ON" else "OFF"}"
+        "-DGEANT4_USE_XM=${if enableXM then "ON" else "OFF"}"
+        "-DGEANT4_USE_OPENGL_X11=${if enableOpenGLX11 then "ON" else "OFF"}"
+        "-DGEANT4_USE_INVENTOR=${if enableInventor then "ON" else "OFF"}"
+        "-DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}"
+        "-DGEANT4_USE_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}"
+        "-DGEANT4_USE_SYSTEM_EXPAT=${if expat != null then "ON" else "OFF"}"
+        "-DGEANT4_USE_SYSTEM_ZLIB=${if zlib != null then "ON" else "OFF"}"
+        "-DINVENTOR_INCLUDE_DIR=${coin3d}/include"
+        "-DINVENTOR_LIBRARY_RELEASE=${coin3d}/lib/libCoin.so"
+      ] ++ stdenv.lib.optional multiThreadingCapable
+        "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}";
 
       enableParallelBuilding = true;
       buildInputs = [ cmake clhep expat zlib xercesc qt motif libGLU_combined xlibsWrapper libXmu libXpm coin3d soxt ];