summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/mkDerivation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/qt-5/mkDerivation.nix')
-rw-r--r--pkgs/development/libraries/qt-5/mkDerivation.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix
index 97bd09c327b2..739c9b4a1608 100644
--- a/pkgs/development/libraries/qt-5/mkDerivation.nix
+++ b/pkgs/development/libraries/qt-5/mkDerivation.nix
@@ -11,17 +11,18 @@ let
 
     qmakeFlags =
       (args.qmakeFlags or [])
-      ++ optional (debug != null)
-          (if debug then "CONFIG+=debug" else "CONFIG+=release");
+      ++ [ ("CONFIG+=" + (if debug then "debug" else "release")) ];
 
-    NIX_CFLAGS_COMPILE = optional (debug != null) "-DQT_NO_DEBUG";
+    NIX_CFLAGS_COMPILE =
+      optional (!debug) "-DQT_NO_DEBUG"
+      ++ lib.toList (args.NIX_CFLAGS_COMPILE or []);
 
     cmakeFlags =
       (args.cmakeFlags or [])
-      ++ [ "-DBUILD_TESTING=OFF" ]
-      ++ optional (debug != null)
-          (if debug then "-DCMAKE_BUILD_TYPE=Debug"
-                    else "-DCMAKE_BUILD_TYPE=Release");
+      ++ [
+        "-DBUILD_TESTING=OFF"
+        ("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
+      ];
 
     enableParallelBuilding = args.enableParallelBuilding or true;