diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2019-09-16 05:44:56 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2019-09-19 07:39:10 -0500 |
commit | 36a8cfc874aa09323abc4a55983e77b5e1061b1f (patch) | |
tree | fbdb52f73346db2ce3004f445c6048909dc1c1d2 /pkgs/development/libraries/qt-5/modules | |
parent | 7962f8c78b5793f07c456af5e8c742e34098707e (diff) | |
download | nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.tar nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.tar.gz nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.tar.bz2 nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.tar.lz nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.tar.xz nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.tar.zst nixpkgs-36a8cfc874aa09323abc4a55983e77b5e1061b1f.zip |
qtbase: Update qmake cache name for Qt >= 5.12.4
Diffstat (limited to 'pkgs/development/libraries/qt-5/modules')
-rw-r--r-- | pkgs/development/libraries/qt-5/modules/qtbase.nix | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 8119513618b..362058736b0 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -31,6 +31,8 @@ assert withGtk3 -> gtk3 != null; let compareVersion = v: builtins.compareVersions version v; + qmakeCacheName = + if compareVersion "5.12.4" >= 0 then ".qmake.stash" else ".qmake.cache"; in stdenv.mkDerivation { @@ -171,8 +173,15 @@ stdenv.mkDerivation { -qmldir $out/$qtQmlPrefix \ -docdir $out/$qtDocPrefix" - createQmakeCache() { - cat >>"$1" <<EOF + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\"" + ''; + + postConfigure = '' + qmakeCacheInjectNixOutputs() { + local cache="$1/${qmakeCacheName}" + if ! [ -f "$cache" ]; then return; fi + echo "qmakeCacheInjectNixOutputs: $cache" + cat >>"$cache" <<EOF NIX_OUTPUT_BIN = $bin NIX_OUTPUT_DEV = $dev NIX_OUTPUT_OUT = $out @@ -183,15 +192,10 @@ stdenv.mkDerivation { } find . -name '.qmake.conf' | while read conf; do - cache=$(dirname $conf)/.qmake.cache - echo "Creating \`$cache'" - createQmakeCache "$cache" + qmakeCacheInjectNixOutputs "$(dirname $conf)" done - - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\"" ''; - NIX_CFLAGS_COMPILE = [ "-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields |