diff --git a/pkgs/applications/graphics/photoqt/default.nix b/pkgs/applications/graphics/photoqt/default.nix index 3b17ce8fd4f8..fed2c944e5c5 100644 --- a/pkgs/applications/graphics/photoqt/default.nix +++ b/pkgs/applications/graphics/photoqt/default.nix @@ -1,28 +1,70 @@ -{ mkDerivation, lib, fetchurl, cmake, exiv2, graphicsmagick, libraw -, qtbase, qtdeclarative, qtmultimedia, qtquickcontrols2, qttools, qtgraphicaleffects -, extra-cmake-modules, poppler, kimageformats, libarchive, pugixml, wrapQtAppsHook}: +{ lib +, stdenv +, 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"; - version = "3.1"; + version = "3.3"; src = fetchurl { - url = "https://${pname}.org/pkgs/${pname}-${version}.tar.gz"; - hash = "sha256-hihfqE7XIlSAxPg3Kzld3LrYS97wDH//GGqpBpBwFm0="; + url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz"; + 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 = [ - qtbase qtquickcontrols2 exiv2 graphicsmagick poppler - qtmultimedia qtdeclarative libraw qtgraphicaleffects - kimageformats libarchive pugixml + exiv2 + graphicsmagick + kimageformats + libarchive + libraw + mpv + poppler + pugixml + qtbase + qtdeclarative + qtgraphicaleffects + qtmultimedia + qtquickcontrols + qtquickcontrols2 ]; cmakeFlags = [ - "-DFREEIMAGE=OFF" "-DDEVIL=OFF" "-DCHROMECAST=OFF" + "-DFREEIMAGE=OFF" + "-DIMAGEMAGICK=OFF" ]; preConfigure = '' @@ -30,9 +72,11 @@ mkDerivation rec { ''; meta = { - homepage = "https://photoqt.org/"; 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; }; }