2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, qttools
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, exiv2
|
|
|
|
, graphicsmagick
|
|
|
|
, kimageformats
|
|
|
|
, libarchive
|
|
|
|
, libraw
|
|
|
|
, mpv
|
|
|
|
, poppler
|
|
|
|
, pugixml
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qtgraphicaleffects
|
|
|
|
, qtmultimedia
|
|
|
|
, qtquickcontrols
|
|
|
|
, qtquickcontrols2
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "photoqt";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz";
|
|
|
|
hash = "sha256-kVf9+zI9rtEMmS0N4qrN673T/1fnqfcV3hQPnMXMLas=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# error: no member named 'setlocale' in namespace 'std'; did you mean simply 'setlocale'?
|
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace cplusplus/main.cpp \
|
|
|
|
--replace "std::setlocale" "setlocale"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
qttools
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
exiv2
|
|
|
|
graphicsmagick
|
|
|
|
kimageformats
|
|
|
|
libarchive
|
|
|
|
libraw
|
|
|
|
mpv
|
|
|
|
poppler
|
|
|
|
pugixml
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtgraphicaleffects
|
|
|
|
qtmultimedia
|
|
|
|
qtquickcontrols
|
|
|
|
qtquickcontrols2
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DDEVIL=OFF"
|
2023-03-15 16:39:30 +00:00
|
|
|
"-DCHROMECAST=OFF"
|
2023-10-09 19:29:22 +00:00
|
|
|
"-DFREEIMAGE=OFF"
|
|
|
|
"-DIMAGEMAGICK=OFF"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export MAGICK_LOCATION="${graphicsmagick}/include/GraphicsMagick"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Simple, yet powerful and good looking image viewer";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://photoqt.org/";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "photoqt";
|
|
|
|
maintainers = with lib.maintainers; [ wegank ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|