about 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>2017-10-24 06:39:54 -0500
committerThomas Tuegel <ttuegel@mailbox.org>2017-11-07 07:18:46 -0600
commitfe0ab944db2176e6757ae89aeebea16ab8dc69d0 (patch)
tree9a9c8962bc6a3083900770c980a5b87666f89688 /pkgs/development/libraries/qt-5/mkDerivation.nix
parent4866f16fbadd2fcc702102944b990ff578379b0a (diff)
downloadnixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.tar
nixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.tar.gz
nixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.tar.bz2
nixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.tar.lz
nixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.tar.xz
nixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.tar.zst
nixlib-fe0ab944db2176e6757ae89aeebea16ab8dc69d0.zip
qt5: factor out common definitions and remove symlink farm
The module definitions are factored out and shared between qt56 and qt59. The
symlink farm which was created during builds is no longer needed.
Diffstat (limited to 'pkgs/development/libraries/qt-5/mkDerivation.nix')
-rw-r--r--pkgs/development/libraries/qt-5/mkDerivation.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix
new file mode 100644
index 000000000000..ef105092fe23
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/mkDerivation.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib }:
+
+let inherit (lib) optional; in
+
+{ debug }:
+
+args:
+
+let
+  args_ = {
+
+    qmakeFlags =
+      (args.qmakeFlags or [])
+      ++ optional (debug != null)
+          (if debug then "CONFIG+=debug" else "CONFIG+=release");
+
+    cmakeFlags =
+      (args.cmakeFlags or [])
+      ++ [ "-DBUILD_TESTING=OFF" ]
+      ++ optional (debug != null)
+          (if debug then "-DCMAKE_BUILD_TYPE=Debug"
+                    else "-DCMAKE_BUILD_TYPE=Release");
+
+    enableParallelBuilding = args.enableParallelBuilding or false;
+
+  };
+in
+
+stdenv.mkDerivation (args // args_)