From 4a39533ab3a67c52e0b896188e09bec76d9ffab8 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Fri, 19 Jan 2018 07:59:17 -0600 Subject: [PATCH] qt5: debug flag should never be null --- pkgs/development/libraries/qt-5/5.10/default.nix | 2 +- pkgs/development/libraries/qt-5/5.6/default.nix | 2 +- pkgs/development/libraries/qt-5/5.9/default.nix | 2 +- pkgs/development/libraries/qt-5/mkDerivation.nix | 16 +++++++--------- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.10/default.nix b/pkgs/development/libraries/qt-5/5.10/default.nix index d65eeef65f44..cf66e60d5696 100644 --- a/pkgs/development/libraries/qt-5/5.10/default.nix +++ b/pkgs/development/libraries/qt-5/5.10/default.nix @@ -24,7 +24,7 @@ top-level attribute to `top-level/all-packages.nix`. # options developerBuild ? false, decryptSslTraffic ? false, - debug ? null, + debug ? false, }: with stdenv.lib; diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 9ad5af8eecd2..1200884a30ce 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -33,7 +33,7 @@ existing packages here and modify it as necessary. # options developerBuild ? false, decryptSslTraffic ? false, - debug ? null, + debug ? false, }: with stdenv.lib; diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix index 7bf61c98086a..9afa818c36e3 100644 --- a/pkgs/development/libraries/qt-5/5.9/default.nix +++ b/pkgs/development/libraries/qt-5/5.9/default.nix @@ -24,7 +24,7 @@ top-level attribute to `top-level/all-packages.nix`. # options developerBuild ? false, decryptSslTraffic ? false, - debug ? null, + debug ? false, }: with stdenv.lib; diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix index 616c96a21fb6..739c9b4a1608 100644 --- a/pkgs/development/libraries/qt-5/mkDerivation.nix +++ b/pkgs/development/libraries/qt-5/mkDerivation.nix @@ -11,20 +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 = - let arg = args.NIX_CFLAGS_COMPILE or []; in - optional (debug == true) "-DQT_NO_DEBUG" - ++ (if builtins.isList arg then arg else [arg]); + 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;