deepin-image-viewer: init at 5.9.4

This commit is contained in:
rewine 2023-01-12 16:55:57 +08:00 committed by rewine
parent 3adf8bdfb2
commit ac500cdd0b
No known key found for this signature in database
GPG key ID: AABB329787290824
3 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,25 @@
From c2fa29800c64f5bda04203bb2eb1845b29c1de3c Mon Sep 17 00:00:00 2001
From: rewine <luhongxu@deepin.org>
Date: Fri, 25 Mar 2022 18:20:17 +0800
Subject: [PATCH] fix install path for nix
---
qimage-plugins/libraw/CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/qimage-plugins/libraw/CMakeLists.txt b/qimage-plugins/libraw/CMakeLists.txt
index 4bfd85ad..00d11bd3 100644
--- a/qimage-plugins/libraw/CMakeLists.txt
+++ b/qimage-plugins/libraw/CMakeLists.txt
@@ -44,7 +44,6 @@ target_include_directories(xraw PUBLIC ${RAW_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIR
target_link_libraries(${CMD_NAME} Qt5::Core Qt5::Gui raw)
-install(TARGETS ${CMD_NAME} DESTINATION ${Qt5Core_DIR}/../../qt5/plugins/imageformats)
-
+install(TARGETS ${CMD_NAME} DESTINATION qt5/plugins/imageformats)
QT5_USE_MODULES(${PROJECT_NAME} Core Gui)
--
2.35.1

View file

@ -0,0 +1,76 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, dtkwidget
, qt5integration
, qt5platform-plugins
, gio-qt
, udisks2-qt5
, image-editor
, cmake
, pkg-config
, qttools
, wrapQtAppsHook
, libraw
, libexif
, qtbase
}:
stdenv.mkDerivation rec {
pname = "deepin-image-viewer";
version = "5.9.4";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-5A6K47NcMkvncZIF5CXeHYYZWEHQ4YDnPDQr2axCmaI=";
};
patches = [
./0001-fix-install-path-for-nix.patch
(fetchpatch {
name = "chore: use GNUInstallDirs in CmakeLists";
url = "https://github.com/linuxdeepin/deepin-image-viewer/commit/4a046e6207fea306e592fddc33c1285cf719a63d.patch";
sha256 = "sha256-aIgYmq6WDfCE+ZcD0GshxM+QmBWZGjh9MzZcTMrhBJ0=";
})
];
postPatch = ''
substituteInPlace src/com.deepin.ImageViewer.service \
--replace "/usr/bin/deepin-image-viewer" "$out/bin/deepin-image-viewer"
'';
nativeBuildInputs = [
cmake
pkg-config
qttools
wrapQtAppsHook
];
buildInputs = [
dtkwidget
qt5platform-plugins
gio-qt
udisks2-qt5
image-editor
libraw
libexif
];
cmakeFlags = [ "-DVERSION=${version}" ];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
];
meta = with lib; {
description = "An image viewing tool with fashion interface and smooth performance";
homepage = "https://github.com/linuxdeepin/deepin-image-viewer";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}

View file

@ -25,6 +25,7 @@ let
deepin-compressor = callPackage ./apps/deepin-compressor { };
deepin-draw = callPackage ./apps/deepin-draw { };
deepin-editor = callPackage ./apps/deepin-editor { };
deepin-image-viewer = callPackage ./apps/deepin-image-viewer { };
deepin-terminal = callPackage ./apps/deepin-terminal { };
#### ARTWORK