diff options
author | rewine <luhongxu@deepin.org> | 2024-05-09 14:51:22 +0800 |
---|---|---|
committer | rewine <luhongxu@deepin.org> | 2024-05-09 17:44:18 +0800 |
commit | 4ee96b38dc476508da6b11125ad5c3ed97026f63 (patch) | |
tree | 049eb42cffacade1a42b794ee74a8f034c7382d3 /pkgs/desktops/deepin | |
parent | 3645b258dd7314a6bebc2bfa95e9f9d4fa772240 (diff) |
deepin.dtk6core: init at 6.0.15
Diffstat (limited to 'pkgs/desktops/deepin')
-rw-r--r-- | pkgs/desktops/deepin/default.nix | 1 | ||||
-rw-r--r-- | pkgs/desktops/deepin/library/dtk6core/default.nix | 84 | ||||
-rw-r--r-- | pkgs/desktops/deepin/library/dtk6core/fix-pkgconfig-path.patch | 14 | ||||
-rw-r--r-- | pkgs/desktops/deepin/library/dtk6core/fix-pri-path.patch | 17 |
4 files changed, 116 insertions, 0 deletions
diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 2edf1359bee9f..2b4a78283478e 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -7,6 +7,7 @@ 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 { }; diff --git a/pkgs/desktops/deepin/library/dtk6core/default.nix b/pkgs/desktops/deepin/library/dtk6core/default.nix new file mode 100644 index 0000000000000..d86bebdea1d83 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtk6core/default.nix @@ -0,0 +1,84 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, doxygen +, qt6Packages +, lshw +, libuchardet +, spdlog +, dtkcommon +, systemd +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "dtk6core"; + version = "6.0.15"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = "dtk6core"; + rev = finalAttrs.version; + hash = "sha256-zUJFilafR0hNH/Owmuyh6BLBFPbBuFKcHv40fena0GM="; + }; + + patches = [ + ./fix-pkgconfig-path.patch + ./fix-pri-path.patch + ]; + + nativeBuildInputs = [ + cmake + pkg-config + doxygen + qt6Packages.qttools + qt6Packages.wrapQtAppsHook + ]; + + dontWrapQtApps = true; + + buildInputs = [ + qt6Packages.qtbase + lshw + libuchardet + spdlog + ] + ++ lib.optional withSystemd systemd; + + propagatedBuildInputs = [ dtkcommon ]; + + cmakeFlags = [ + "-DDTK_VERSION=${finalAttrs.version}" + "-DBUILD_DOCS=ON" + "-DBUILD_EXAMPLES=OFF" + "-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/share/doc" + "-DDSG_PREFIX_PATH='/run/current-system/sw'" + "-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules" + "-DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata" + "-DBUILD_WITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}" + ]; + + 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/DCore/bin/*; do + wrapQtApp $binary + done + ''; + + meta = { + description = "Deepin tool kit core library"; + homepage = "https://github.com/linuxdeepin/dtk6core"; + license = lib.licenses.lgpl3Plus; + platforms = lib.platforms.linux; + maintainers = lib.teams.deepin.members; + }; +}) diff --git a/pkgs/desktops/deepin/library/dtk6core/fix-pkgconfig-path.patch b/pkgs/desktops/deepin/library/dtk6core/fix-pkgconfig-path.patch new file mode 100644 index 0000000000000..570e34c061471 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtk6core/fix-pkgconfig-path.patch @@ -0,0 +1,14 @@ +diff --git a/misc/dtkcore.pc.in b/misc/dtkcore.pc.in +index 83eecb7..da24ce8 100644 +--- a/misc/dtkcore.pc.in ++++ b/misc/dtkcore.pc.in +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-libdir=${prefix}/@LIBRARY_INSTALL_DIR@ +-includedir=${prefix}/@INCLUDE_INSTALL_DIR@ ++libdir=@LIBRARY_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ + + Name: dtk@DTK_VERSION_MAJOR@core + Description: Deepin Tool Kit dtkcore header files diff --git a/pkgs/desktops/deepin/library/dtk6core/fix-pri-path.patch b/pkgs/desktops/deepin/library/dtk6core/fix-pri-path.patch new file mode 100644 index 0000000000000..19953ed1733d9 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtk6core/fix-pri-path.patch @@ -0,0 +1,17 @@ +diff --git a/misc/qt_lib_dtkcore.pri.in b/misc/qt_lib_dtkcore.pri.in +index a331f52..ce01dc0 100644 +--- a/misc/qt_lib_dtkcore.pri.in ++++ b/misc/qt_lib_dtkcore.pri.in +@@ -4,9 +4,9 @@ QT.dtkcore.MINOR_VERSION = @PROJECT_VERSION_MINOR@ + QT.dtkcore.PATCH_VERSION = @PROJECT_VERSION_PATCH@ + QT.dtkcore.name = dtkcore + QT.dtkcore.module = dtk@DTK_VERSION_MAJOR@core +-QT.dtkcore.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@ +-QT.dtkcore.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@ +-QT.dtkcore.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@ ++QT.dtkcore.tools = @TOOL_INSTALL_DIR@ ++QT.dtkcore.libs = @LIBRARY_INSTALL_DIR@ ++QT.dtkcore.includes = @INCLUDE_INSTALL_DIR@ + QT.dtkcore.frameworks = + QT.dtkcore.depends = core dbus xml + QT.dtkcore.module_config = v2 ltcg |