diff options
| author | K900 <me@0upti.me> | 2022-06-29 19:39:46 +0300 |
|---|---|---|
| committer | K900 <me@0upti.me> | 2022-06-29 19:45:51 +0300 |
| commit | 1dd8db724acca1ac8308fbb6ffac3f09a19d95ab (patch) | |
| tree | 3c1478839e6029a1e332e78c76106188db02324d | |
| parent | mathematica: set QT_QPA_PLATFORM to xcb (#178991) (diff) | |
| download | nixpkgs-origin/qt6ct.tar.gz | |
qt6ct: init at 0.5origin/qt6ct
Involves a mildly janky patch, but what can you do.
| -rw-r--r-- | pkgs/tools/misc/qt6ct/default.nix | 40 | ||||
| -rw-r--r-- | pkgs/tools/misc/qt6ct/fix-qtpaths.diff | 22 | ||||
| -rw-r--r-- | pkgs/top-level/qt6-packages.nix | 2 |
3 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/tools/misc/qt6ct/default.nix b/pkgs/tools/misc/qt6ct/default.nix new file mode 100644 index 000000000000..dbdd8d204498 --- /dev/null +++ b/pkgs/tools/misc/qt6ct/default.nix @@ -0,0 +1,40 @@ +{ + stdenv, + lib, + + fetchFromGitHub, + + cmake, + wrapQtAppsHook, + symlinkJoin, + + qtbase, + qttools, + qtsvg +}: +stdenv.mkDerivation rec { + pname = "qt6ct"; + version = "0.5"; + + src = fetchFromGitHub { + owner = "trialuser02"; + repo = "qt6ct"; + rev = version; + sha256 = "sha256-ph3x1c+jlOhm++BKhWYe6LoI7jZaU5J8LoGp/kU54S0="; + }; + + # the build system tries to detect it with qtpaths, but that does not work on NixOS + patches = [ ./fix-qtpaths.diff ]; + cmakeFlags = [ "-DPLUGINDIR=${placeholder "out"}/${qtbase.qtPluginPrefix}" ]; + + nativeBuildInputs = [ cmake wrapQtAppsHook qttools ]; + buildInputs = [ qtbase qtsvg ]; + + meta = with lib; { + description = "Qt6 Configuration Tool"; + homepage = "https://github.com/trialuser02/qt6ct"; + platforms = platforms.linux; + license = licenses.bsd2; + maintainers = with maintainers; [ k900 ]; + }; +} diff --git a/pkgs/tools/misc/qt6ct/fix-qtpaths.diff b/pkgs/tools/misc/qt6ct/fix-qtpaths.diff new file mode 100644 index 000000000000..333fa49256c0 --- /dev/null +++ b/pkgs/tools/misc/qt6ct/fix-qtpaths.diff @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b029931..23d50b7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,17 +39,7 @@ else() + 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}) + + message(STATUS "Generating translations ...") diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index 4d66d838dd2b..4f03ad31b18f 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -20,4 +20,6 @@ in # LIBRARIES quazip = callPackage ../development/libraries/quazip { }; + + qt6ct = callPackage ../tools/misc/qt6ct { }; }))) |
