From eaaa899658df154c3970b04a72aad2ff3a8cca1d Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:16:11 +0100 Subject: [PATCH] photoqt: 3.4 -> 4.0.1 --- .../applications/graphics/photoqt/default.nix | 42 +++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkgs/applications/graphics/photoqt/default.nix b/pkgs/applications/graphics/photoqt/default.nix index 9513b92f60ac..0135e692888d 100644 --- a/pkgs/applications/graphics/photoqt/default.nix +++ b/pkgs/applications/graphics/photoqt/default.nix @@ -7,40 +7,31 @@ , wrapQtAppsHook , exiv2 , graphicsmagick -, kimageformats , libarchive , libraw , mpv , poppler , pugixml , qtbase +, qtcharts , qtdeclarative -, qtgraphicaleffects +, qtimageformats +, qtlocation , qtmultimedia -, qtquickcontrols -, qtquickcontrols2 +, qtpositioning +, qtsvg +, qtwayland }: stdenv.mkDerivation rec { pname = "photoqt"; - version = "3.4"; + version = "4.0.1"; src = fetchurl { url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz"; - hash = "sha256-kVf9+zI9rtEMmS0N4qrN673T/1fnqfcV3hQPnMXMLas="; + hash = "sha256-nmEipzatselwtBR//ayajqgmhaUnAMKW7JBLKdzutHg="; }; - postPatch = '' - # exiv2 0.28.1 - substituteInPlace CMakeLists.txt \ - --replace "exiv2lib" "exiv2" - '' - # error: no member named 'setlocale' in namespace 'std'; did you mean simply 'setlocale'? - + lib.optionalString stdenv.isDarwin '' - substituteInPlace cplusplus/main.cpp \ - --replace "std::setlocale" "setlocale" - ''; - nativeBuildInputs = [ cmake extra-cmake-modules @@ -51,18 +42,21 @@ stdenv.mkDerivation rec { buildInputs = [ exiv2 graphicsmagick - kimageformats libarchive libraw mpv poppler pugixml qtbase + qtcharts qtdeclarative - qtgraphicaleffects + qtimageformats + qtlocation qtmultimedia - qtquickcontrols - qtquickcontrols2 + qtpositioning + qtsvg + ] ++ lib.optionals stdenv.isLinux [ + qtwayland ]; cmakeFlags = [ @@ -76,6 +70,12 @@ stdenv.mkDerivation rec { export MAGICK_LOCATION="${graphicsmagick}/include/GraphicsMagick" ''; + postInstall = lib.optionalString stdenv.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/"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a838e1e9d2d8..95399bb4de94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34667,7 +34667,7 @@ with pkgs; phantomsocks = callPackage ../tools/networking/phantomsocks { }; - photoqt = libsForQt5.callPackage ../applications/graphics/photoqt { }; + photoqt = qt6Packages.callPackage ../applications/graphics/photoqt { }; photoflare = libsForQt5.callPackage ../applications/graphics/photoflare { };