diff --git a/pkgs/desktops/deepin/apps/deepin-album/default.nix b/pkgs/desktops/deepin/apps/deepin-album/default.nix new file mode 100644 index 000000000000..44cafeb6fb1a --- /dev/null +++ b/pkgs/desktops/deepin/apps/deepin-album/default.nix @@ -0,0 +1,77 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, qttools +, wrapQtAppsHook +, dtkwidget +, qt5integration +, qt5platform-plugins +, udisks2-qt5 +, gio-qt +, image-editor +, glibmm +, freeimage +, opencv +, ffmpeg +, ffmpegthumbnailer +, qtbase +}: + +stdenv.mkDerivation rec { + pname = "deepin-album"; + version = "5.10.9"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-S/oVRD72dtpnvfGV6YfN5/syrmWA44H/1BbmAe0xjAY="; + }; + + # This patch should be removed after upgrading to 6.0.0 + postPatch = '' + substituteInPlace libUnionImage/CMakeLists.txt \ + --replace "/usr" "$out" + substituteInPlace src/CMakeLists.txt \ + --replace "set(PREFIX /usr)" "set(PREFIX $out)" \ + --replace "/usr/bin" "$out/bin" \ + --replace "/usr/share/deepin-manual/manual-assets/application/)" "share/deepin-manual/manual-assets/application/)" + ''; + + nativeBuildInputs = [ + cmake + pkg-config + qttools + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + qt5platform-plugins + udisks2-qt5 + gio-qt + image-editor + glibmm + freeimage + opencv + ffmpeg + ffmpegthumbnailer + ]; + + # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH + qtWrapperArgs = [ + "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" + ]; + + cmakeFlags = [ "-DVERSION=${version}" ]; + + meta = with lib; { + description = "A fashion photo manager for viewing and organizing pictures"; + homepage = "https://github.com/linuxdeepin/deepin-album"; + 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 4268032f8413..509c0fd15808 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -21,6 +21,7 @@ let udisks2-qt5 = callPackage ./library/udisks2-qt5 { }; #### Dtk Application + deepin-album = callPackage ./apps/deepin-album { }; deepin-calculator = callPackage ./apps/deepin-calculator { }; deepin-compressor = callPackage ./apps/deepin-compressor { }; deepin-draw = callPackage ./apps/deepin-draw { };