Merge pull request #237026 from NixOS/backport-207166-to-release-22.11

[Backport release-22.11] rapid-photo-downloader: 0.9.18 -> 0.9.34
This commit is contained in:
Nick Cao
2023-06-11 03:41:15 -06:00
committed by GitHub
4 changed files with 95 additions and 13 deletions

View File

@@ -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+=(

View File

@@ -0,0 +1,25 @@
{ lib
, buildPythonPackage
, fetchPypi
, cffi
, libheif
}:
buildPythonPackage rec {
pname = "pyheif";
version = "0.7.1";
src = fetchPypi {
inherit pname version;
hash = "sha256-hqXFF0N51xRrXtGmiJL69yaKE1+39QOaARv7em6QMgA=";
};
propagatedBuildInputs = [ cffi libheif ];
meta = with lib; {
homepage = "https://github.com/carsales/pyheif";
description = "Python interface to libheif library";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}

View File

@@ -0,0 +1,39 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
, importlib-metadata
, packaging
, pyxdg
}:
buildPythonPackage rec {
pname = "show-in-file-manager";
version = "1.1.4";
src = fetchPypi {
inherit pname version;
hash = "sha256-FdFuSodbniF7A40C8CnDgAxKatZF4/c8nhB+omurOts=";
};
propagatedBuildInputs = [
packaging
]
++ lib.optional (stdenv.isLinux) pyxdg
++ lib.optional (pythonOlder "3.8") importlib-metadata;
meta = with lib; {
homepage = "https://github.com/damonlynch/showinfilemanager";
description = "Open the system file manager and select files in it";
longDescription = ''
Show in File Manager is a Python package to open the system file
manager and optionally select files in it. The point is not to
open the files, but to select them in the file manager, thereby
highlighting the files and allowing the user to quickly do
something with them.
'';
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View File

@@ -7958,6 +7958,8 @@ self: super: with self; {
pyhs100 = callPackage ../development/python-modules/pyhs100 { };
pyheif = callPackage ../development/python-modules/pyheif { };
pyi2cflash = callPackage ../development/python-modules/pyi2cflash { };
pyialarm = callPackage ../development/python-modules/pyialarm { };
@@ -10241,6 +10243,8 @@ self: super: with self; {
should-dsl = callPackage ../development/python-modules/should-dsl { };
show-in-file-manager = callPackage ../development/python-modules/show-in-file-manager { };
showit = callPackage ../development/python-modules/showit { };
shtab = callPackage ../development/python-modules/shtab { };