From ac5a585ed8ef6cbc6fd32127165b52022ba4c1b8 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 24 Jan 2016 16:43:16 -0600 Subject: [PATCH] qt55: add fixQtModuleCMakeConfig setup hook --- pkgs/development/libraries/qt-5/5.5/default.nix | 2 ++ .../libraries/qt-5/5.5/fix-qt-module-cmake-config.sh | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 pkgs/development/libraries/qt-5/5.5/fix-qt-module-cmake-config.sh diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix index 9863683840cb..88f064edc7d3 100644 --- a/pkgs/development/libraries/qt-5/5.5/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/default.nix @@ -42,6 +42,7 @@ let inherit src; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); + nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig ]; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; dontAddPrefix = args.dontAddPrefix or true; @@ -113,6 +114,7 @@ let ]; makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; + fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh; }; diff --git a/pkgs/development/libraries/qt-5/5.5/fix-qt-module-cmake-config.sh b/pkgs/development/libraries/qt-5/5.5/fix-qt-module-cmake-config.sh new file mode 100644 index 000000000000..7ca3e33b613c --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/fix-qt-module-cmake-config.sh @@ -0,0 +1,5 @@ +fixQtModuleCMakeConfig() { + local module="$1" + sed -e "/set(imported_location/ s@\\\${_qt5${module}_install_prefix}@${!outputLib}@" \ + -i "${!outputDev}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake" +}