summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/mkDerivation.nix
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2018-01-19 07:50:54 -0600
committerThomas Tuegel <ttuegel@mailbox.org>2018-01-20 09:10:57 -0600
commitc1720b412b955fa7739f880738a3284a2d5b4460 (patch)
treee963746fa4ab61dce25bf9398fcb1fcc97a17d6f /pkgs/development/libraries/qt-5/mkDerivation.nix
parenta97eaae95088936df4e9029b368a1ce63f07234b (diff)
downloadnixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.tar
nixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.tar.gz
nixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.tar.bz2
nixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.tar.lz
nixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.tar.xz
nixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.tar.zst
nixpkgs-c1720b412b955fa7739f880738a3284a2d5b4460.zip
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
Diffstat (limited to 'pkgs/development/libraries/qt-5/mkDerivation.nix')
-rw-r--r--pkgs/development/libraries/qt-5/mkDerivation.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix
index 97bd09c327b..616c96a21fb 100644
--- a/pkgs/development/libraries/qt-5/mkDerivation.nix
+++ b/pkgs/development/libraries/qt-5/mkDerivation.nix
@@ -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 [])