1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
{
lib,
stdenv,
fetchurl,
cmake,
extra-cmake-modules,
exiv2,
graphicsmagick,
libarchive,
libraw,
mpv,
pugixml,
qt6,
qt6Packages,
zxing-cpp,
}:
stdenv.mkDerivation rec {
pname = "photoqt";
version = "4.6";
src = fetchurl {
url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz";
hash = "sha256-5VbGMJ1B9yDbTiri7SZ+r+c9LdfG/C1c0/01QBUvbCY=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
qt6.qttools
qt6.wrapQtAppsHook
];
buildInputs =
[
exiv2
graphicsmagick
libarchive
libraw
pugixml
qt6.qtbase
qt6.qtcharts
qt6.qtdeclarative
qt6.qtimageformats
qt6.qtlocation
qt6.qtmultimedia
qt6.qtpositioning
qt6.qtsvg
qt6Packages.poppler
zxing-cpp
]
++ lib.optionals stdenv.hostPlatform.isLinux [
mpv
qt6.qtwayland
];
cmakeFlags = [
(lib.cmakeBool "DEVIL" false)
(lib.cmakeBool "CHROMECAST" false)
(lib.cmakeBool "FREEIMAGE" false)
(lib.cmakeBool "IMAGEMAGICK" false)
(lib.cmakeBool "VIDEO_MPV" (!stdenv.hostPlatform.isDarwin))
];
env.MAGICK_LOCATION = "${graphicsmagick}/include/GraphicsMagick";
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/photoqt.app $out/Applications
makeWrapper $out/{Applications/photoqt.app/Contents/MacOS,bin}/photoqt
'';
meta = {
description = "Simple, yet powerful and good looking image viewer";
homepage = "https://photoqt.org/";
license = lib.licenses.gpl2Plus;
mainProgram = "photoqt";
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.unix;
};
}
|