about summary refs log tree commit diff
path: root/pkgs/desktops/deepin
diff options
context:
space:
mode:
authorrewine <luhongxu@deepin.org>2023-09-27 11:37:54 +0800
committerrewine <luhongxu@deepin.org>2023-11-23 10:00:36 +0800
commitaa4d16aa25b29eba35a29d642d28961ae761f328 (patch)
tree53c35f6b85375859f24741c748c4d257f6418fb8 /pkgs/desktops/deepin
parent3f1eb313e002b11b3fb4779664c7cf28b910f89c (diff)
downloadnixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.tar
nixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.tar.gz
nixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.tar.bz2
nixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.tar.lz
nixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.tar.xz
nixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.tar.zst
nixlib-aa4d16aa25b29eba35a29d642d28961ae761f328.zip
deepin-voice-note: 5.11.1 -> 6.0.13
Diffstat (limited to 'pkgs/desktops/deepin')
-rw-r--r--pkgs/desktops/deepin/apps/deepin-voice-note/default.nix26
-rw-r--r--pkgs/desktops/deepin/apps/deepin-voice-note/use_v23_dbus_interface.diff13
2 files changed, 33 insertions, 6 deletions
diff --git a/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix b/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix
index 599baa24e436..dce0807faa97 100644
--- a/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix
+++ b/pkgs/desktops/deepin/apps/deepin-voice-note/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchFromGitHub
+, fetchpatch
 , cmake
 , pkg-config
 , qttools
@@ -16,22 +17,37 @@
 , gst_all_1
 , gtest
 }:
+
 stdenv.mkDerivation rec {
   pname = "deepin-voice-note";
-  version = "5.11.1";
+  version = "6.0.13";
 
   src = fetchFromGitHub {
     owner = "linuxdeepin";
     repo = pname;
     rev = version;
-    sha256 = "sha256-JX4OuVu+5/a3IhkfnvaWVDaKl+xg/8qxlvp9hM0nHNU=";
+    hash = "sha256-yDlWyMGkSToGCN7tuZNR8Mz7MUOZ7355w4H0OzeHBrs=";
   };
 
+  patches = [
+    ./use_v23_dbus_interface.diff
+    (fetchpatch {
+      name = "Adjust-the-audio-port-available-range.patch";
+      url = "https://github.com/linuxdeepin/deepin-voice-note/commit/a876e4c4cf7d77e50071246f9fb6998aa62def77.patch";
+      hash = "sha256-J/PPdj1Am/v2Sw2Dv2XvZJAy/6Tf7OoTfrbOB9rc5m8=";
+    })
+    (fetchpatch {
+      name = "fix-build-error-with-new-dtk.patch";
+      url = "https://github.com/linuxdeepin/deepin-voice-note/commit/9ce211f603deaff21b881e1c4f43d53e33a85347.patch";
+      hash = "sha256-oP+AzMniONxjYIFust8fGaD8/UOjKr4yZiRUkdTMd5w=";
+    })
+  ];
+
   postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace "/usr" "$out"
     substituteInPlace src/common/audiowatcher.cpp \
       --replace "/usr/share" "$out/share"
-    substituteInPlace assets/deepin-voice-note.desktop \
-      --replace "/usr/bin" "$out/bin"
   '';
 
   nativeBuildInputs = [
@@ -61,8 +77,6 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [ "-DVERSION=${version}" ];
 
-  env.NIX_CFLAGS_COMPILE = "-I${dde-qt-dbus-factory}/include/libdframeworkdbus-2.0";
-
   preFixup = ''
     qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
   '';
diff --git a/pkgs/desktops/deepin/apps/deepin-voice-note/use_v23_dbus_interface.diff b/pkgs/desktops/deepin/apps/deepin-voice-note/use_v23_dbus_interface.diff
new file mode 100644
index 000000000000..213b73e36b41
--- /dev/null
+++ b/pkgs/desktops/deepin/apps/deepin-voice-note/use_v23_dbus_interface.diff
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e7bfb81..f56f11a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -103,7 +103,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -fstack-protector-all")
+ execute_process(COMMAND cat /etc/os-version OUTPUT_VARIABLE OS_INFO_STR)
+ string(REGEX MATCHALL "MajorVersion=[0-9]+" MAJOR_STR "${OS_INFO_STR}")
+ string(REGEX MATCH "[0-9]+" MAJOR_VERSION "${MAJOR_STR}")
+-if (MAJOR_VERSION MATCHES "23")
++if (TRUE)
+     message("--------------------- OS_BUILD_V23 on")
+     add_definitions(-DOS_BUILD_V23)
+ endif()