Could NOT find qtpaths executable
milahu opened this issue · comments
Lines 42 to 43 in e41923d
problem is:
lrelease
is part of theqttools
moduleqtpaths
is part of theqtbase
module
so, on nixos, these have different prefixes
fixed by using the commented code blocks
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,14 +24,14 @@
find_package(Qt6 COMPONENTS BuildInternals Widgets Concurrent LinguistTools REQUIRED)
-#get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION)
+get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION)
get_target_property(QT_LRELEASE_EXECUTABLE Qt6::lrelease IMPORTED_LOCATION)
-#if(QT_QTPATHS_EXECUTABLE)
-# message(STATUS "Found qtpaths executable: " ${QT_QTPATHS_EXECUTABLE})
-#else()
-# message(FATAL_ERROR "Could NOT find qtpaths executable")
-#endif()
+if(QT_QTPATHS_EXECUTABLE)
+ message(STATUS "Found qtpaths executable: " ${QT_QTPATHS_EXECUTABLE})
+else()
+ message(FATAL_ERROR "Could NOT find qtpaths executable")
+endif()
if(QT_LRELEASE_EXECUTABLE)
message(STATUS "Found lrelease executable: " ${QT_LRELEASE_EXECUTABLE})
@@ -39,15 +39,6 @@
message(FATAL_ERROR "Could NOT find lrelease executable")
endif()
-get_filename_component(QT_QTPATHS_EXECUTABLE ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
-set(QT_QTPATHS_EXECUTABLE ${QT_QTPATHS_EXECUTABLE}/qtpaths)
-
-if(EXISTS ${QT_QTPATHS_EXECUTABLE})
- message(STATUS "Found qtpaths executable: " ${QT_QTPATHS_EXECUTABLE})
-else()
- message(FATAL_ERROR "Could NOT find qtpaths executable")
-endif()
-
#execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} -query QT_INSTALL_PLUGINS OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} --plugin-dir OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Plugin path: " ${PLUGINDIR})
fixed by using the commented code blocks
is there a good reason this code is commented?
maybe use the current code as fallback?
Is this the reason that it can't find my kvantum theme? All I have is "Fusion" and "Windows" when I try to configure via the GUI.
Obviously this needs to be called with pkgs.qt6.callPackage
and not the other two.
It compiles perfectly fine but doesn't find the Kvantum (or any other) themes.
{
stdenv,
lib,
fetchFromGitHub,
wrapQtAppsHook,
qtbase,
qtsvg,
qttools,
qmake,
qtwayland,
}:
stdenv.mkDerivation rec {
pname = "qt6ct";
version = "0.7";
src = fetchFromGitHub {
owner = "trialuser02";
repo = "qt6ct";
rev = version;
sha256 = "sha256-7WuHdb7gmdC/YqrPDT7OYbD6BEm++EcIkmORW7cSPDE=";
};
nativeBuildInputs = [qmake qttools qtwayland wrapQtAppsHook];
buildInputs = [qtbase qtsvg];
qmakeFlags = [
"LRELEASE_EXECUTABLE=${lib.getDev qttools}/bin/lrelease"
"PLUGINDIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
];
# meta = with lib; {
# description = "Qt5 Configuration Tool";
# homepage = "https://www.opendesktop.org/content/show.php?content=168066";
# platforms = platforms.linux;
# license = licenses.bsd2;
# maintainers = with maintainers; [ralith];
# };
}
Is this the reason that it can't find my kvantum theme?
no. qt themes should be in $QT_PLUGIN_PATH on runtime (not on compiletime)
qmakeFlags = [ "LRELEASE_EXECUTABLE=${lib.getDev qttools}/bin/lrelease"
see also NixOS/nixpkgs#214943
#31 should fix this.
Not sure what the idea behind setting the qtpaths executable from the path to lconvert, but I made it fallback to that only if qtpaths is not found normally.