about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/deepin/library/dtkcore
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/deepin/library/dtkcore')
-rw-r--r--nixpkgs/pkgs/desktops/deepin/library/dtkcore/default.nix24
-rw-r--r--nixpkgs/pkgs/desktops/deepin/library/dtkcore/fix-pkgconfig-path.patch14
-rw-r--r--nixpkgs/pkgs/desktops/deepin/library/dtkcore/fix-pri-path.patch17
3 files changed, 48 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/desktops/deepin/library/dtkcore/default.nix b/nixpkgs/pkgs/desktops/deepin/library/dtkcore/default.nix
index 3ca5622d197c..e3b4d1166c91 100644
--- a/nixpkgs/pkgs/desktops/deepin/library/dtkcore/default.nix
+++ b/nixpkgs/pkgs/desktops/deepin/library/dtkcore/default.nix
@@ -10,6 +10,7 @@
 , gsettings-qt
 , lshw
 , libuchardet
+, spdlog
 , dtkcommon
 , systemd
 , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
@@ -17,15 +18,20 @@
 
 stdenv.mkDerivation rec {
   pname = "dtkcore";
-  version = "5.6.10";
+  version = "5.6.17";
 
   src = fetchFromGitHub {
     owner = "linuxdeepin";
     repo = pname;
     rev = version;
-    sha256 = "sha256-ge8DiJMSaZo7GeQEgnDbi5SLsLxtOQ/P5/9aBgaG7Ds=";
+    hash = "sha256-/MGSvT8tPn+KqqlM6FY2iFsArmAkYMW5Q3Sl4g4zvH0=";
   };
 
+  patches = [
+    ./fix-pkgconfig-path.patch
+    ./fix-pri-path.patch
+  ];
+
   postPatch = ''
     substituteInPlace src/dsysinfo.cpp \
       --replace "/usr/share/deepin/distribution.info" "/etc/distribution.info" \
@@ -39,25 +45,27 @@ stdenv.mkDerivation rec {
     wrapQtAppsHook
   ];
 
+  dontWrapQtApps = true;
+
   buildInputs = [
     qtbase
     gsettings-qt
     lshw
     libuchardet
+    spdlog
   ]
   ++ lib.optional withSystemd systemd;
 
   propagatedBuildInputs = [ dtkcommon ];
 
   cmakeFlags = [
-    "-DDVERSION=${version}"
-    "-DBUILD_EXAMPLES=OFF"
+    "-DDTK_VERSION=${version}"
     "-DBUILD_DOCS=ON"
-    "-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}"
+    "-DBUILD_EXAMPLES=OFF"
+    "-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
     "-DDSG_PREFIX_PATH='/run/current-system/sw'"
     "-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules"
-    "-DCMAKE_INSTALL_LIBDIR=lib"
-    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+    "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "dev"}/libexec"
     "-DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata"
     "-DBUILD_WITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}"
   ];
@@ -68,6 +76,8 @@ stdenv.mkDerivation rec {
     export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
   '';
 
+  outputs = [ "out" "dev" "doc" ];
+
   meta = with lib; {
     description = "Deepin tool kit core library";
     homepage = "https://github.com/linuxdeepin/dtkcore";
diff --git a/nixpkgs/pkgs/desktops/deepin/library/dtkcore/fix-pkgconfig-path.patch b/nixpkgs/pkgs/desktops/deepin/library/dtkcore/fix-pkgconfig-path.patch
new file mode 100644
index 000000000000..570e34c06147
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/library/dtkcore/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/nixpkgs/pkgs/desktops/deepin/library/dtkcore/fix-pri-path.patch b/nixpkgs/pkgs/desktops/deepin/library/dtkcore/fix-pri-path.patch
new file mode 100644
index 000000000000..19953ed1733d
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/library/dtkcore/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