photoqt: 3.1 -> 3.3

This commit is contained in:
Weijia Wang 2023-09-30 23:51:27 +02:00
parent d90e8fdfb7
commit 5a9a7eb345

View file

@ -1,28 +1,70 @@
{ mkDerivation, lib, fetchurl, cmake, exiv2, graphicsmagick, libraw { lib
, qtbase, qtdeclarative, qtmultimedia, qtquickcontrols2, qttools, qtgraphicaleffects , stdenv
, extra-cmake-modules, poppler, kimageformats, libarchive, pugixml, wrapQtAppsHook}: , fetchurl
, cmake
, extra-cmake-modules
, qttools
, wrapQtAppsHook
, exiv2
, graphicsmagick
, kimageformats
, libarchive
, libraw
, mpv
, poppler
, pugixml
, qtbase
, qtdeclarative
, qtgraphicaleffects
, qtmultimedia
, qtquickcontrols
, qtquickcontrols2
}:
mkDerivation rec { stdenv.mkDerivation rec {
pname = "photoqt"; pname = "photoqt";
version = "3.1"; version = "3.3";
src = fetchurl { src = fetchurl {
url = "https://${pname}.org/pkgs/${pname}-${version}.tar.gz"; url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz";
hash = "sha256-hihfqE7XIlSAxPg3Kzld3LrYS97wDH//GGqpBpBwFm0="; hash = "sha256-AD+Uww/tmXRiAkmeuHBBollE6Y9L7c+fB882ALVtSXQ=";
}; };
nativeBuildInputs = [ cmake extra-cmake-modules qttools wrapQtAppsHook ]; # 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
];
buildInputs = [ buildInputs = [
qtbase qtquickcontrols2 exiv2 graphicsmagick poppler exiv2
qtmultimedia qtdeclarative libraw qtgraphicaleffects graphicsmagick
kimageformats libarchive pugixml kimageformats
libarchive
libraw
mpv
poppler
pugixml
qtbase
qtdeclarative
qtgraphicaleffects
qtmultimedia
qtquickcontrols
qtquickcontrols2
]; ];
cmakeFlags = [ cmakeFlags = [
"-DFREEIMAGE=OFF"
"-DDEVIL=OFF" "-DDEVIL=OFF"
"-DCHROMECAST=OFF" "-DCHROMECAST=OFF"
"-DFREEIMAGE=OFF"
"-DIMAGEMAGICK=OFF"
]; ];
preConfigure = '' preConfigure = ''
@ -30,9 +72,11 @@ mkDerivation rec {
''; '';
meta = { meta = {
homepage = "https://photoqt.org/";
description = "Simple, yet powerful and good looking image viewer"; description = "Simple, yet powerful and good looking image viewer";
homepage = "https://photoqt.org/";
license = lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
mainProgram = "photoqt";
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
}; };
} }