diff options
author | Nick Cao <nickcao@nichi.co> | 2023-04-22 10:44:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-22 10:44:42 +0800 |
commit | f1b783683eda01de10f928472fd8e152e8859de9 (patch) | |
tree | 34c924bba581f87765591f6214d7128a43662d40 /pkgs/desktops/deepin | |
parent | 3956d901b4014bbbbb8e7600394e412b9574a20e (diff) | |
parent | 4873ea0b9029bfc4e9089558c61d9b6413f0e59f (diff) |
Merge pull request #227393 from wineee/dde-screen-recorder
deepin.deepin-screen-recorder: init at 5.11.23
Diffstat (limited to 'pkgs/desktops/deepin')
-rw-r--r-- | pkgs/desktops/deepin/apps/deepin-screen-recorder/default.nix | 97 | ||||
-rw-r--r-- | pkgs/desktops/deepin/apps/deepin-screen-recorder/dont_use_libPath.diff | 36 | ||||
-rw-r--r-- | pkgs/desktops/deepin/default.nix | 1 |
3 files changed, 134 insertions, 0 deletions
diff --git a/pkgs/desktops/deepin/apps/deepin-screen-recorder/default.nix b/pkgs/desktops/deepin/apps/deepin-screen-recorder/default.nix new file mode 100644 index 0000000000000..4074365bb1ffa --- /dev/null +++ b/pkgs/desktops/deepin/apps/deepin-screen-recorder/default.nix @@ -0,0 +1,97 @@ +{ stdenv +, lib +, fetchFromGitHub +, qmake +, pkg-config +, qttools +, wrapQtAppsHook +, dtkwidget +, qt5integration +, dde-qt-dbus-factory +, dde-dock +, qtbase +, qtmultimedia +, qtx11extras +, image-editor +, gsettings-qt +, xorg +, libusb1 +, libv4l +, ffmpeg +, ffmpegthumbnailer +, portaudio +, kwayland +, udev +, gst_all_1 +}: +stdenv.mkDerivation rec { + pname = "deepin-screen-recorder"; + version = "5.11.23"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-yKBF/MmhlgwO5GLwfGgs13ERuzOg8EYjc3bXZ8TvcBU="; + }; + + patches = [ ./dont_use_libPath.diff ]; + + postPatch = '' + substituteInPlace screen_shot_recorder.pro deepin-screen-recorder.desktop \ + src/{src.pro,pin_screenshots/pin_screenshots.pro} \ + src/dde-dock-plugins/{shotstart/shotstart.pro,recordtime/recordtime.pro} \ + assets/com.deepin.Screenshot.service \ + --replace "/usr" "$out" + ''; + + nativeBuildInputs = [ + qmake + pkg-config + qttools + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + dde-qt-dbus-factory + dde-dock + qtbase + qtmultimedia + qtx11extras + image-editor + gsettings-qt + xorg.libXdmcp + xorg.libXtst + xorg.libXcursor + libusb1 + libv4l + ffmpeg + ffmpegthumbnailer + portaudio + kwayland + udev + ] ++ (with gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-good + ]); + + # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH + qtWrapperArgs = [ + "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev gst_all_1.gstreamer ]}" + ]; + + preFixup = '' + qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") + ''; + + meta = with lib; { + description = "Screen recorder application for dde"; + homepage = "https://github.com/linuxdeepin/deepin-screen-recorder"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} diff --git a/pkgs/desktops/deepin/apps/deepin-screen-recorder/dont_use_libPath.diff b/pkgs/desktops/deepin/apps/deepin-screen-recorder/dont_use_libPath.diff new file mode 100644 index 0000000000000..3707ab4c67c2d --- /dev/null +++ b/pkgs/desktops/deepin/apps/deepin-screen-recorder/dont_use_libPath.diff @@ -0,0 +1,36 @@ +diff --git a/src/gstrecord/gstinterface.cpp b/src/gstrecord/gstinterface.cpp +index b269b01..c075295 100644 +--- a/src/gstrecord/gstinterface.cpp ++++ b/src/gstrecord/gstinterface.cpp +@@ -48,6 +48,7 @@ gstInterface::gstInterface() + } + QString gstInterface::libPath(const QString &sLib) + { ++ return sLib; + qInfo() << "gstreamer lib name is " << sLib; + QDir dir; + QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath); +diff --git a/src/main_window.cpp b/src/main_window.cpp +index 7bfc78e..dcbbc2f 100755 +--- a/src/main_window.cpp ++++ b/src/main_window.cpp +@@ -585,6 +585,7 @@ void MainWindow::initDynamicLibPath() + } + QString MainWindow::libPath(const QString &strlib) + { ++ return strlib; + QDir dir; + QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath); + dir.setPath(path); +diff --git a/src/waylandrecord/avlibinterface.cpp b/src/waylandrecord/avlibinterface.cpp +index d7942d6..c5cfdf4 100644 +--- a/src/waylandrecord/avlibinterface.cpp ++++ b/src/waylandrecord/avlibinterface.cpp +@@ -105,6 +105,7 @@ avlibInterface::avlibInterface() + + QString avlibInterface::libPath(const QString &sLib) + { ++ return sLib; + //qDebug() << sLib; + QDir dir; + QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath); diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 59f051a66215c..0b4bffe384383 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -48,6 +48,7 @@ let deepin-movie-reborn = callPackage ./apps/deepin-movie-reborn { }; deepin-music = callPackage ./apps/deepin-music { }; deepin-picker = callPackage ./apps/deepin-picker { }; + deepin-screen-recorder = callPackage ./apps/deepin-screen-recorder { }; deepin-shortcut-viewer = callPackage ./apps/deepin-shortcut-viewer { }; deepin-system-monitor = callPackage ./apps/deepin-system-monitor { }; deepin-terminal = callPackage ./apps/deepin-terminal { }; |