summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-3/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-31 17:24:28 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-31 17:26:22 -0400
commit353e2010c7b714825be4b84ada90dc07e3a09b7e (patch)
tree0d7098bae45d9d08ef5c7c95d426c98612dec6e7 /pkgs/development/libraries/qt-3/default.nix
parent4663cd2b3b2f64210f61265068c294a21b70f5ee (diff)
downloadnixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.tar
nixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.tar.gz
nixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.tar.bz2
nixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.tar.lz
nixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.tar.xz
nixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.tar.zst
nixpkgs-353e2010c7b714825be4b84ada90dc07e3a09b7e.zip
qt-3: Make `configureFlags` a list
Diffstat (limited to 'pkgs/development/libraries/qt-3/default.nix')
-rw-r--r--pkgs/development/libraries/qt-3/default.nix54
1 files changed, 33 insertions, 21 deletions
diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix
index 32841c9b933..0691f26b471 100644
--- a/pkgs/development/libraries/qt-3/default.nix
+++ b/pkgs/development/libraries/qt-3/default.nix
@@ -34,27 +34,39 @@ stdenv.mkDerivation {
 
   hardeningDisable = [ "format" ];
 
-  configureFlags = "
-    -v
-    -system-zlib -system-libpng -system-libjpeg
-    -qt-gif
-    -I${xextproto}/include
-    ${if openglSupport then "-dlopen-opengl
-      -L${libGLU_combined}/lib -I${libGLU_combined}/include
-      -L${libXmu.out}/lib -I${libXmu.dev}/include" else ""}
-    ${if threadSupport then "-thread" else "-no-thread"}
-    ${if xrenderSupport then "-xrender -L${libXrender.out}/lib -I${libXrender.dev}/include" else "-no-xrender"}
-    ${if xrandrSupport then "-xrandr
-      -L${libXrandr.out}/lib -I${libXrandr.dev}/include
-      -I${randrproto}/include" else "-no-xrandr"}
-    ${if xineramaSupport then "-xinerama -L${libXinerama.out}/lib -I${libXinerama.dev}/include" else "-no-xinerama"}
-    ${if cursorSupport then "-L${libXcursor.out}/lib -I${libXcursor.dev}/include" else ""}
-    ${if mysqlSupport then "-qt-sql-mysql -L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql" else ""}
-    ${if xftSupport then "-xft
-      -L${libXft.out}/lib -I${libXft.dev}/include
-      -L${libXft.freetype.out}/lib -I${libXft.freetype.dev}/include
-      -L${libXft.fontconfig.lib}/lib -I${libXft.fontconfig.dev}/include" else "-no-xft"}
-  ";
+  configureFlags = let
+    mk = cond: name: "-${stdenv.lib.optionalString (!cond) "no-"}${name}";
+  in [
+    "-v"
+    "-system-zlib" "-system-libpng" "-system-libjpeg"
+    "-qt-gif"
+    "-I${xextproto}/include"
+    (mk threadSupport "thread")
+    (mk xrenderSupport "xrender")
+    (mk xrandrSupport "xrandr")
+    (mk xineramaSupport "xinerama")
+    (mk xrandrSupport "xrandr")
+    (mk xftSupport "xft")
+  ] ++ stdenv.lib.optionals openglSupport [
+    "-dlopen-opengl"
+    "-L${libGLU_combined}/lib" "-I${libGLU_combined}/include"
+    "-L${libXmu.out}/lib" "-I${libXmu.dev}/include"
+  ] ++ stdenv.lib.optionals xrenderSupport [
+    "-L${libXrender.out}/lib" "-I${libXrender.dev}/include"
+  ] ++ stdenv.lib.optionals xrandrSupport [
+    "-L${libXrandr.out}/lib" "-I${libXrandr.dev}/include"
+    "-I${randrproto}/include"
+  ] ++ stdenv.lib.optionals xineramaSupport [
+    "-L${libXinerama.out}/lib" "-I${libXinerama.dev}/include"
+  ] ++ stdenv.lib.optionals cursorSupport [
+    "-L${libXcursor.out}/lib -I${libXcursor.dev}/include"
+  ] ++ stdenv.lib.optionals mysqlSupport [
+    "-qt-sql-mysql" "-L${mysql.connector-c}/lib/mysql" "-I${mysql.connector-c}/include/mysql"
+  ] ++ stdenv.lib.optionals xftSupport [
+    "-L${libXft.out}/lib" "-I${libXft.dev}/include"
+    "-L${libXft.freetype.out}/lib" "-I${libXft.freetype.dev}/include"
+    "-L${libXft.fontconfig.lib}/lib" "-I${libXft.fontconfig.dev}/include"
+  ];
 
   patches = [
     # Don't strip everything so we can get useful backtraces.