about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDan Callahan2022-12-21 22:29:58 +0000
committerDan Callahan2023-01-22 23:54:06 +0000
commit684b3ea2478f71ee40b23c4be0be35af10f07aa5 (patch)
tree930a844df9d697796d4a74b0610a2a854b22afb1
parentf01831ad50beeeac8f8c0c814139da2ebce435bd (diff)
rapid-photo-downloader: 0.9.18 -> 0.9.34
-rw-r--r--pkgs/applications/graphics/rapid-photo-downloader/default.nix40
1 files changed, 27 insertions, 13 deletions
diff --git a/pkgs/applications/graphics/rapid-photo-downloader/default.nix b/pkgs/applications/graphics/rapid-photo-downloader/default.nix
index f9120ca0ee48..706992e2961d 100644
--- a/pkgs/applications/graphics/rapid-photo-downloader/default.nix
+++ b/pkgs/applications/graphics/rapid-photo-downloader/default.nix
@@ -1,24 +1,24 @@
-{ lib, mkDerivationWith, fetchurl, python3Packages
+{ lib, mkDerivationWith, fetchFromGitHub, python3Packages
 , file, intltool, gobject-introspection, libgudev
-, udisks, gexiv2, gst_all_1, libnotify
+, udisks, gexiv2, gst_all_1, libnotify, ifuse, libimobiledevice
 , exiftool, gdk-pixbuf, libmediainfo, vmtouch
 }:
 
 mkDerivationWith python3Packages.buildPythonApplication rec {
   pname = "rapid-photo-downloader";
-  version = "0.9.18";
+  version = "0.9.34";
 
-  src = fetchurl {
-    url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
-    sha256 = "15p7sssg6vmqbm5xnc4j5dr89d7gl7y5qyq44a240yl5aqkjnybw";
+  src = fetchFromGitHub {
+    owner = "damonlynch";
+    repo = "rapid-photo-downloader";
+    rev = "v${version}";
+    hash = "sha256-4VC1fwQh9L3c5tgLUaC36p9QHL4dR2vkWc2XlNl0Xzw=";
   };
 
-  # Disable version check and fix install tests
+  # Disable version check
   postPatch = ''
     substituteInPlace raphodo/constants.py \
       --replace "disable_version_check = False" "disable_version_check = True"
-    substituteInPlace raphodo/rescan.py \
-      --replace "from preferences" "from raphodo.preferences"
   '';
 
   nativeBuildInputs = [
@@ -28,9 +28,15 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
 
   # Package has no generally usable unit tests.
   # The included doctests expect specific, hardcoded hardware to be present.
-  doCheck = false;
+  # Instead, we just make sure the program runs enough to report its version.
+  checkPhase = ''
+    export XDG_DATA_HOME=$(mktemp -d)
+    export QT_QPA_PLATFORM=offscreen
+    $out/bin/rapid-photo-downloader --detailed-version
+  '';
 
-  # NOTE: Without gobject-introspection in buildInputs, launching fails with
+  # NOTE: Without gobject-introspection in buildInputs and strictDeps = false,
+  #       launching fails with:
   #       "Namespace [Notify / GExiv2 / GUdev] not available"
   buildInputs = [
     gdk-pixbuf
@@ -46,7 +52,11 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
     udisks
   ];
 
+  strictDeps = false;
+
   propagatedBuildInputs = with python3Packages; [
+    ifuse
+    libimobiledevice
     pyqt5
     pygobject3
     gphoto2
@@ -57,15 +67,19 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
     arrow
     python-dateutil
     easygui
+    babel
     colour
+    pillow
+    pyheif
     pymediainfo
     sortedcontainers
-    rawkit
     requests
     colorlog
     pyprind
+    setuptools
+    show-in-file-manager
     tenacity
-  ];
+  ] ++ lib.optional (pythonOlder "3.8") importlib-metadata;
 
   preFixup = ''
     makeWrapperArgs+=(