From a3f27a2720feab66b37c6b7ee0f23517cde544b6 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Thu, 30 Apr 2020 17:54:40 -0700 Subject: [PATCH] qimgv: 0.8.9 -> 0.9 https://github.com/easymodo/qimgv/compare/v0.8.9...v0.9 --- pkgs/applications/graphics/qimgv/default.nix | 17 +++++++++++++++-- .../graphics/qimgv/qt5-12-compat.diff | 13 +++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/graphics/qimgv/qt5-12-compat.diff diff --git a/pkgs/applications/graphics/qimgv/default.nix b/pkgs/applications/graphics/qimgv/default.nix index 2756d659edf3..4bbf6aa31d3d 100644 --- a/pkgs/applications/graphics/qimgv/default.nix +++ b/pkgs/applications/graphics/qimgv/default.nix @@ -1,12 +1,14 @@ { mkDerivation , lib , fetchFromGitHub +, fetchpatch , cmake , pkgconfig , exiv2 , mpv +, opencv4 , qtbase , qtimageformats , qtsvg @@ -14,15 +16,25 @@ mkDerivation rec { pname = "qimgv"; - version = "0.8.9"; + version = "0.9"; src = fetchFromGitHub { owner = "easymodo"; repo = pname; rev = "v${version}"; - sha256 = "0cmya06j466v0pirhxbzbj1vbz0346y7rbc1gbv4n9xcp6c6bln6"; + sha256 = "1yynjk47gjf2kjfb0ak4blxpb5irgqc1k59z726lwjd6gvg689fl"; }; + patches = [ + # QtAtomicInt's `storeRelaxed` was introduced in Qt 5.14, while nixpkgs only + # has Qt 5.12. This appears to be the only instance of Qt 5.12 + # incompatibility, and will be fixed in the next release. + (fetchpatch { + url = "https://github.com/easymodo/qimgv/commit/a39d6086ceb9445d2c16943e0719096a99920bf8.patch"; + sha256 = "1z3ngv6i316hrdcdzig4jg6bcdbgfxjaxvm2jcfcw2dnfbfiq47s"; + }) + ]; + nativeBuildInputs = [ cmake pkgconfig @@ -31,6 +43,7 @@ mkDerivation rec { buildInputs = [ exiv2 mpv + opencv4 qtbase qtimageformats qtsvg diff --git a/pkgs/applications/graphics/qimgv/qt5-12-compat.diff b/pkgs/applications/graphics/qimgv/qt5-12-compat.diff new file mode 100644 index 000000000000..da64759e22d6 --- /dev/null +++ b/pkgs/applications/graphics/qimgv/qt5-12-compat.diff @@ -0,0 +1,13 @@ +diff --git a/qimgv/components/directorymanager/watchers/linux/linuxworker.cpp b/qimgv/components/directorymanager/watchers/linux/linuxworker.cpp +index 96ec9d3..6d95d08 100644 +--- a/qimgv/components/directorymanager/watchers/linux/linuxworker.cpp ++++ b/qimgv/components/directorymanager/watchers/linux/linuxworker.cpp +@@ -21,7 +21,7 @@ void LinuxWorker::setDescriptor(int desc) { + + void LinuxWorker::run() { + emit started(); +- isRunning.storeRelaxed(true); ++ isRunning.store(true); + + if (fd == -1) { + qDebug() << TAG << "File descriptor isn't set! Stopping";