diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2018-01-02 07:16:38 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2018-01-15 18:48:37 -0600 |
commit | 75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c (patch) | |
tree | 337e46c6e56bbf0af3cd851a65a362eace8ac57a /pkgs/development/libraries/qt-5/mkDerivation.nix | |
parent | 37933209588792db24104dbfaef0106c3bef870d (diff) | |
download | nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.tar nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.tar.gz nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.tar.bz2 nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.tar.lz nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.tar.xz nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.tar.zst nixpkgs-75d2a7dc4dd0dc084cbc1b47dc7f6b69566ee35c.zip |
qt5: reduce closure size
First, closure size is reduced by including the static libraries in $out instead of trying to move them to $dev. The Qt build system cannot handle libraries being split between different prefixes. Previously, the static libraries were moved into $dev and the shared libraries were symlinked from $out to $dev to fool the build system. However, this causes $dev to be retained at runtime. Instead, we now keep the static libraries in $out. Fortunately, the static libraries are not very large anyway. Second, we build with QT_NO_DEBUG defined unless debugging is enabled. This causes some assertions to be removed; when assertions are included, they pull paths from $dev into the runtime closure by using the __FILE__ macro. We also now patch qtbase to remove even more assertions when QT_NO_DEBUG is defined.
Diffstat (limited to 'pkgs/development/libraries/qt-5/mkDerivation.nix')
-rw-r--r-- | pkgs/development/libraries/qt-5/mkDerivation.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix index 385ebeacd8f..97bd09c327b 100644 --- a/pkgs/development/libraries/qt-5/mkDerivation.nix +++ b/pkgs/development/libraries/qt-5/mkDerivation.nix @@ -14,6 +14,8 @@ let ++ optional (debug != null) (if debug then "CONFIG+=debug" else "CONFIG+=release"); + NIX_CFLAGS_COMPILE = optional (debug != null) "-DQT_NO_DEBUG"; + cmakeFlags = (args.cmakeFlags or []) ++ [ "-DBUILD_TESTING=OFF" ] |