about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/photoqt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/graphics/photoqt/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/graphics/photoqt/default.nix42
1 files changed, 21 insertions, 21 deletions
diff --git a/nixpkgs/pkgs/applications/graphics/photoqt/default.nix b/nixpkgs/pkgs/applications/graphics/photoqt/default.nix
index 9513b92f60ac..21febdc02b7e 100644
--- a/nixpkgs/pkgs/applications/graphics/photoqt/default.nix
+++ b/nixpkgs/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.1";
 
   src = fetchurl {
     url = "https://photoqt.org/pkgs/photoqt-${version}.tar.gz";
-    hash = "sha256-kVf9+zI9rtEMmS0N4qrN673T/1fnqfcV3hQPnMXMLas=";
+    hash = "sha256-vxQZFlS4C+Dg9I6BKeMUFOYHz74d28gbhJlIpxSKTvs=";
   };
 
-  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/";