From 58609f1dc5183df1c37a34be40f219f7ccacc705 Mon Sep 17 00:00:00 2001 From: rewine Date: Thu, 12 Jan 2023 17:06:08 +0800 Subject: [PATCH] deepin.deepin-movie-reborn: init at 5.10.17 --- .../apps/deepin-movie-reborn/default.nix | 129 ++++++++++++++++++ pkgs/desktops/deepin/default.nix | 1 + 2 files changed, 130 insertions(+) create mode 100644 pkgs/desktops/deepin/apps/deepin-movie-reborn/default.nix diff --git a/pkgs/desktops/deepin/apps/deepin-movie-reborn/default.nix b/pkgs/desktops/deepin/apps/deepin-movie-reborn/default.nix new file mode 100644 index 000000000000..eaeeae989299 --- /dev/null +++ b/pkgs/desktops/deepin/apps/deepin-movie-reborn/default.nix @@ -0,0 +1,129 @@ +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, runtimeShell +, cmake +, pkg-config +, wrapQtAppsHook +, qtbase +, qttools +, qtx11extras +, qtmultimedia +, dtkwidget +, qt5integration +, qt5platform-plugins +, qtmpris +, qtdbusextended +, gsettings-qt +, elfutils +, ffmpeg +, ffmpegthumbnailer +, mpv +, xorg +, pcre +, libdvdread +, libdvdnav +, libunwind +, libva +, zstd +, glib +, gst_all_1 +, gtest +, libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "deepin-movie-reborn"; + version = "5.10.23"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-0m8wYRQGsdN4zpnHUJKCfF05SdvTauRSp6gCu2F9ZAI"; + }; + + patches = [ + (fetchpatch { + name = "chore: dont use "; + url = "https://github.com/linuxdeepin/deepin-movie-reborn/commit/2afc63541589adab8b0c8c48e290f03535ec2996.patch"; + sha256 = "sha256-Q9dv5L5sUGeuvNxF8ypQlZuZVuU4NIR/8d8EyP/Q5wk="; + }) + (fetchpatch { + name = "feat: rewrite libPath to read LD_LIBRARY_PATH"; + url = "https://github.com/linuxdeepin/deepin-movie-reborn/commit/432bf452ed244c256e99ecaf80bb6a0eef9b4a74.patch"; + sha256 = "sha256-5hRQ8D9twBKgouVpIBa1pdAGk0lI/wEdQaHBBHFCZBA"; + }) + ]; + + postPatch = '' + substituteInPlace src/widgets/toolbox_proxy.cpp \ + --replace "/bin/bash" "${runtimeShell}" + ''; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ + cmake + pkg-config + qttools + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + qt5platform-plugins + qtx11extras + qtmultimedia + qtdbusextended + qtmpris + gsettings-qt + elfutils.dev + ffmpeg + ffmpegthumbnailer + xorg.libXtst + xorg.libXdmcp + xorg.xcbproto + pcre.dev + libdvdread + libdvdnav + libunwind + libva + zstd.dev + mpv + gtest + libpulseaudio + ] ++ (with gst_all_1; [ + gstreamer + gst-plugins-base + ]); + + # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH + qtWrapperArgs = [ + "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ mpv ffmpeg ffmpegthumbnailer gst_all_1.gstreamer gst_all_1.gst-plugins-base ]}" + ]; + + env.NIX_CFLAGS_COMPILE = toString [ + "-I${gst_all_1.gstreamer.dev}/include/gstreamer-1.0" + "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0" + ]; + + cmakeFlags = [ + "-DVERSION=${version}" + ]; + + preFixup = '' + glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} + qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0") + ''; + + meta = with lib; { + description = "Full-featured video player supporting playing local and streaming media in multiple video formats"; + homepage = "https://github.com/linuxdeepin/deepin-movie-reborn"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 4195af30e5d7..64479dca5eca 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -42,6 +42,7 @@ let deepin-draw = callPackage ./apps/deepin-draw { }; deepin-editor = callPackage ./apps/deepin-editor { }; deepin-image-viewer = callPackage ./apps/deepin-image-viewer { }; + deepin-movie-reborn = callPackage ./apps/deepin-movie-reborn { }; deepin-music = callPackage ./apps/deepin-music { }; deepin-picker = callPackage ./apps/deepin-picker { }; deepin-terminal = callPackage ./apps/deepin-terminal { };