qt5.mkDerivation: honor argument NIX_CFLAGS_COMPILE

If ‘mkDerivation’ is passed ‘NIX_CFLAGS_COMPILE’, we should include those flags
along with the common flags.

See also: #34039 #34038 #33935 #33933 #33930 #33927
This commit is contained in:
Thomas Tuegel 2018-01-19 07:50:54 -06:00
parent a97eaae950
commit c1720b412b
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59

View File

@ -14,7 +14,10 @@ let
++ optional (debug != null)
(if debug then "CONFIG+=debug" else "CONFIG+=release");
NIX_CFLAGS_COMPILE = optional (debug != null) "-DQT_NO_DEBUG";
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]);
cmakeFlags =
(args.cmakeFlags or [])