diff --git a/pkgs/desktops/deepin/apps/deepin-compressor/default.nix b/pkgs/desktops/deepin/apps/deepin-compressor/default.nix new file mode 100644 index 000000000000..d62c72ca0b11 --- /dev/null +++ b/pkgs/desktops/deepin/apps/deepin-compressor/default.nix @@ -0,0 +1,73 @@ +{ stdenv +, lib +, fetchFromGitHub +, dtkwidget +, qt5integration +, qt5platform-plugins +, udisks2-qt5 +, cmake +, qtbase +, qttools +, pkg-config +, kcodecs +, karchive +, wrapQtAppsHook +, minizip +, libzip +, libarchive +}: + +stdenv.mkDerivation rec { + pname = "deepin-compressor"; + version = "5.12.9"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-HJDtUvXUT94G4WqrK92UMmijnuC4ApkKHU3yE3rOKHQ="; + }; + + postPatch = '' + substituteInPlace src/source/common/pluginmanager.cpp \ + --replace "/usr/lib/" "$out/lib/" + substituteInPlace src/desktop/deepin-compressor.desktop \ + --replace "/usr" "$out" + ''; + + nativeBuildInputs = [ + cmake + qttools + pkg-config + wrapQtAppsHook + ]; + + buildInputs = [ + dtkwidget + qt5platform-plugins + udisks2-qt5 + kcodecs + karchive + minizip + libzip + libarchive + ]; + + cmakeFlags = [ + "-DVERSION=${version}" + "-DUSE_TEST=OFF" + ]; + + # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH + qtWrapperArgs = [ + "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}" + ]; + + meta = with lib; { + description = "A fast and lightweight application for creating and extracting archives"; + homepage = "https://github.com/linuxdeepin/deepin-compressor"; + 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 ec3302908a05..f40a44b193ec 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -22,6 +22,7 @@ let #### Dtk Application deepin-calculator = callPackage ./apps/deepin-calculator { }; + deepin-compressor = callPackage ./apps/deepin-compressor { }; deepin-editor = callPackage ./apps/deepin-editor { }; deepin-terminal = callPackage ./apps/deepin-terminal { };