Merge pull request #34047 from ttuegel/bugfix/qt-5/NIX_CFLAGS_COMPILE

Qt 5: Fix debug flags

authored by Thomas Tuegel and committed by GitHub 88464eca 67841d41

+11 -10
+1 -1
pkgs/development/libraries/qt-5/5.10/default.nix
··· 24 24 # options 25 25 developerBuild ? false, 26 26 decryptSslTraffic ? false, 27 - debug ? null, 27 + debug ? false, 28 28 }: 29 29 30 30 with stdenv.lib;
+1 -1
pkgs/development/libraries/qt-5/5.6/default.nix
··· 33 33 # options 34 34 developerBuild ? false, 35 35 decryptSslTraffic ? false, 36 - debug ? null, 36 + debug ? false, 37 37 }: 38 38 39 39 with stdenv.lib;
+1 -1
pkgs/development/libraries/qt-5/5.9/default.nix
··· 24 24 # options 25 25 developerBuild ? false, 26 26 decryptSslTraffic ? false, 27 - debug ? null, 27 + debug ? false, 28 28 }: 29 29 30 30 with stdenv.lib;
+8 -7
pkgs/development/libraries/qt-5/mkDerivation.nix
··· 11 11 12 12 qmakeFlags = 13 13 (args.qmakeFlags or []) 14 - ++ optional (debug != null) 15 - (if debug then "CONFIG+=debug" else "CONFIG+=release"); 14 + ++ [ ("CONFIG+=" + (if debug then "debug" else "release")) ]; 16 15 17 - NIX_CFLAGS_COMPILE = optional (debug != null) "-DQT_NO_DEBUG"; 16 + NIX_CFLAGS_COMPILE = 17 + optional (!debug) "-DQT_NO_DEBUG" 18 + ++ lib.toList (args.NIX_CFLAGS_COMPILE or []); 18 19 19 20 cmakeFlags = 20 21 (args.cmakeFlags or []) 21 - ++ [ "-DBUILD_TESTING=OFF" ] 22 - ++ optional (debug != null) 23 - (if debug then "-DCMAKE_BUILD_TYPE=Debug" 24 - else "-DCMAKE_BUILD_TYPE=Release"); 22 + ++ [ 23 + "-DBUILD_TESTING=OFF" 24 + ("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release")) 25 + ]; 25 26 26 27 enableParallelBuilding = args.enableParallelBuilding or true; 27 28