1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-05-07 14:47:02 +00:00

qt5: debug flag should never be null

This commit is contained in:
Thomas Tuegel 2018-01-19 07:59:17 -06:00
parent c1720b412b
commit 4a39533ab3
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
4 changed files with 10 additions and 12 deletions

View file

@ -24,7 +24,7 @@ top-level attribute to `top-level/all-packages.nix`.
# options # options
developerBuild ? false, developerBuild ? false,
decryptSslTraffic ? false, decryptSslTraffic ? false,
debug ? null, debug ? false,
}: }:
with stdenv.lib; with stdenv.lib;

View file

@ -33,7 +33,7 @@ existing packages here and modify it as necessary.
# options # options
developerBuild ? false, developerBuild ? false,
decryptSslTraffic ? false, decryptSslTraffic ? false,
debug ? null, debug ? false,
}: }:
with stdenv.lib; with stdenv.lib;

View file

@ -24,7 +24,7 @@ top-level attribute to `top-level/all-packages.nix`.
# options # options
developerBuild ? false, developerBuild ? false,
decryptSslTraffic ? false, decryptSslTraffic ? false,
debug ? null, debug ? false,
}: }:
with stdenv.lib; with stdenv.lib;

View file

@ -11,20 +11,18 @@ let
qmakeFlags = qmakeFlags =
(args.qmakeFlags or []) (args.qmakeFlags or [])
++ optional (debug != null) ++ [ ("CONFIG+=" + (if debug then "debug" else "release")) ];
(if debug then "CONFIG+=debug" else "CONFIG+=release");
NIX_CFLAGS_COMPILE = NIX_CFLAGS_COMPILE =
let arg = args.NIX_CFLAGS_COMPILE or []; in optional (!debug) "-DQT_NO_DEBUG"
optional (debug == true) "-DQT_NO_DEBUG" ++ lib.toList (args.NIX_CFLAGS_COMPILE or []);
++ (if builtins.isList arg then arg else [arg]);
cmakeFlags = cmakeFlags =
(args.cmakeFlags or []) (args.cmakeFlags or [])
++ [ "-DBUILD_TESTING=OFF" ] ++ [
++ optional (debug != null) "-DBUILD_TESTING=OFF"
(if debug then "-DCMAKE_BUILD_TYPE=Debug" ("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
else "-DCMAKE_BUILD_TYPE=Release"); ];
enableParallelBuilding = args.enableParallelBuilding or true; enableParallelBuilding = args.enableParallelBuilding or true;