diff options
Diffstat (limited to 'pkgs/desktops/deepin')
-rw-r--r-- | pkgs/desktops/deepin/default.nix | 3 | ||||
-rw-r--r-- | pkgs/desktops/deepin/library/dtk6gui/default.nix | 74 | ||||
-rw-r--r-- | pkgs/desktops/deepin/library/dtk6gui/fix-pkgconfig-path.patch | 16 | ||||
-rw-r--r-- | pkgs/desktops/deepin/library/dtk6gui/fix-pri-path.patch | 17 |
4 files changed, 109 insertions, 1 deletions
diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 2b4a78283478e..234cad9d4b6ad 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -7,7 +7,6 @@ let #### LIBRARIES dtkcommon = callPackage ./library/dtkcommon { }; dtkcore = callPackage ./library/dtkcore { }; - dtk6core = callPackage ./library/dtk6core { }; dtkgui = callPackage ./library/dtkgui { }; dtkwidget = callPackage ./library/dtkwidget { }; dtkdeclarative = callPackage ./library/dtkdeclarative { }; @@ -24,6 +23,8 @@ let image-editor = callPackage ./library/image-editor { }; udisks2-qt5 = callPackage ./library/udisks2-qt5 { }; util-dfm = callPackage ./library/util-dfm { }; + dtk6core = callPackage ./library/dtk6core { }; + dtk6gui = callPackage ./library/dtk6gui { }; #### CORE deepin-kwin = callPackage ./core/deepin-kwin { }; diff --git a/pkgs/desktops/deepin/library/dtk6gui/default.nix b/pkgs/desktops/deepin/library/dtk6gui/default.nix new file mode 100644 index 0000000000000..73638c39e62fe --- /dev/null +++ b/pkgs/desktops/deepin/library/dtk6gui/default.nix @@ -0,0 +1,74 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, doxygen +, qt6Packages +, dtk6core +, librsvg +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "dtk6gui"; + version = "6.0.15"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = "dtk6gui"; + rev = finalAttrs.version; + hash = "sha256-B/A3VXPCon+NIUhO+IVGoojACVjut2h0nH5pLdJYufw="; + }; + + patches = [ + ./fix-pkgconfig-path.patch + ./fix-pri-path.patch + ]; + + nativeBuildInputs = [ + cmake + pkg-config + doxygen + qt6Packages.qttools + qt6Packages.wrapQtAppsHook + ]; + + buildInputs = [ + qt6Packages.qtbase + librsvg + ]; + + propagatedBuildInputs = [ + dtk6core + qt6Packages.qtimageformats + ]; + + cmakeFlags = [ + "-DDTK_VERSION=${finalAttrs.version}" + "-DBUILD_DOCS=ON" + "-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules" + "-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/share/doc" + ]; + + preConfigure = '' + # qt.qpa.plugin: Could not find the Qt platform plugin "minimal" + # A workaround is to set QT_PLUGIN_PATH explicitly + export QT_PLUGIN_PATH=${lib.getBin qt6Packages.qtbase}/${qt6Packages.qtbase.qtPluginPrefix} + ''; + + outputs = [ "out" "dev" "doc" ]; + + postFixup = '' + for binary in $out/libexec/dtk6/DGui/bin/*; do + wrapQtApp $binary + done + ''; + + meta = { + description = "Deepin Toolkit, gui module for DDE look and feel"; + homepage = "https://github.com/linuxdeepin/dtk6gui"; + license = lib.licenses.lgpl3Plus; + platforms = lib.platforms.linux; + maintainers = lib.teams.deepin.members; + }; +}) diff --git a/pkgs/desktops/deepin/library/dtk6gui/fix-pkgconfig-path.patch b/pkgs/desktops/deepin/library/dtk6gui/fix-pkgconfig-path.patch new file mode 100644 index 0000000000000..1485baccc2044 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtk6gui/fix-pkgconfig-path.patch @@ -0,0 +1,16 @@ +diff --git a/misc/dtkgui.pc.in b/misc/dtkgui.pc.in +index 89fdbbf..ad817c4 100644 +--- a/misc/dtkgui.pc.in ++++ b/misc/dtkgui.pc.in +@@ -1,8 +1,8 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-libdir=${prefix}/@LIBRARY_INSTALL_DIR@ +-includedir=${prefix}/@INCLUDE_INSTALL_DIR@ +-tooldir=${prefix}/@PACKAGE_TOOL_INSTALL_DIR@ ++libdir=@LIBRARY_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ ++tooldir=@PACKAGE_TOOL_INSTALL_DIR@ + + Name: dtk@DTK_VERSION_MAJOR@gui + Description: Deepin Tool Kit dtkgui header files diff --git a/pkgs/desktops/deepin/library/dtk6gui/fix-pri-path.patch b/pkgs/desktops/deepin/library/dtk6gui/fix-pri-path.patch new file mode 100644 index 0000000000000..b746d34b1c79a --- /dev/null +++ b/pkgs/desktops/deepin/library/dtk6gui/fix-pri-path.patch @@ -0,0 +1,17 @@ +diff --git a/misc/qt_lib_dtkgui.pri.in b/misc/qt_lib_dtkgui.pri.in +index 28308ee..9fb25e6 100644 +--- a/misc/qt_lib_dtkgui.pri.in ++++ b/misc/qt_lib_dtkgui.pri.in +@@ -4,9 +4,9 @@ QT.dtkgui.MINOR_VERSION = @PROJECT_VERSION_MINOR@ + QT.dtkgui.PATCH_VERSION = @PROJECT_VERSION_PATCH@ + QT.dtkgui.name = dtkgui + QT.dtkgui.module = dtk@DTK_VERSION_MAJOR@gui +-QT.dtkgui.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@ +-QT.dtkgui.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@ +-QT.dtkgui.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@ ++QT.dtkgui.tools = @TOOL_INSTALL_DIR@ ++QT.dtkgui.libs = @LIBRARY_INSTALL_DIR@ ++QT.dtkgui.includes = @INCLUDE_INSTALL_DIR@ + QT.dtkgui.frameworks = + QT.dtkgui.depends = core gui dtkcore gui_private dbus network + QT.dtkgui.module_config = v2 internal_module ltcg |