2021-01-25 08:26:54 +00:00
|
|
|
{ lib, mkDerivationWith, fetchurl, python3Packages
|
2018-12-02 11:41:15 +00:00
|
|
|
, file, intltool, gobject-introspection, libgudev
|
2019-04-15 23:03:30 +01:00
|
|
|
, udisks, gexiv2, gst_all_1, libnotify
|
2019-05-22 12:03:39 +01:00
|
|
|
, exiftool, gdk-pixbuf, libmediainfo, vmtouch
|
2018-03-09 09:22:37 +00:00
|
|
|
}:
|
|
|
|
|
2019-08-08 12:34:51 +01:00
|
|
|
mkDerivationWith python3Packages.buildPythonApplication rec {
|
2018-03-09 09:22:37 +00:00
|
|
|
pname = "rapid-photo-downloader";
|
2020-01-28 09:02:36 +00:00
|
|
|
version = "0.9.18";
|
2018-03-09 09:22:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
|
2020-01-28 09:02:36 +00:00
|
|
|
sha256 = "15p7sssg6vmqbm5xnc4j5dr89d7gl7y5qyq44a240yl5aqkjnybw";
|
2018-03-09 09:22:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Disable version check and fix install tests
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace raphodo/constants.py \
|
|
|
|
--replace "disable_version_check = False" "disable_version_check = True"
|
|
|
|
substituteInPlace raphodo/rescan.py \
|
|
|
|
--replace "from preferences" "from raphodo.preferences"
|
|
|
|
'';
|
|
|
|
|
2019-04-15 23:03:30 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
file
|
|
|
|
intltool
|
|
|
|
];
|
|
|
|
|
|
|
|
# Package has no generally usable unit tests.
|
|
|
|
# The included doctests expect specific, hardcoded hardware to be present.
|
|
|
|
doCheck = false;
|
2018-03-09 09:22:37 +00:00
|
|
|
|
2019-04-15 23:03:30 +01:00
|
|
|
# NOTE: Without gobject-introspection in buildInputs, launching fails with
|
|
|
|
# "Namespace [Notify / GExiv2 / GUdev] not available"
|
2018-03-09 09:22:37 +00:00
|
|
|
buildInputs = [
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2019-04-15 23:03:30 +01:00
|
|
|
gexiv2
|
|
|
|
gobject-introspection
|
|
|
|
gst_all_1.gst-libav
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-good
|
2018-03-09 09:22:37 +00:00
|
|
|
gst_all_1.gstreamer
|
2019-04-15 23:03:30 +01:00
|
|
|
gst_all_1.gstreamer.dev
|
|
|
|
libgudev
|
2018-03-09 09:22:37 +00:00
|
|
|
libnotify
|
2019-04-15 23:03:30 +01:00
|
|
|
udisks
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2018-03-09 09:22:37 +00:00
|
|
|
pyqt5
|
|
|
|
pygobject3
|
|
|
|
gphoto2
|
|
|
|
pyzmq
|
|
|
|
tornado
|
|
|
|
psutil
|
|
|
|
pyxdg
|
|
|
|
arrow
|
|
|
|
dateutil
|
|
|
|
easygui
|
|
|
|
colour
|
|
|
|
pymediainfo
|
|
|
|
sortedcontainers
|
|
|
|
rawkit
|
|
|
|
requests
|
|
|
|
colorlog
|
|
|
|
pyprind
|
2019-08-10 08:15:15 +01:00
|
|
|
tenacity
|
2019-04-15 23:03:30 +01:00
|
|
|
];
|
2018-03-09 09:22:37 +00:00
|
|
|
|
2019-12-10 23:23:57 +00:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
|
|
|
|
--set PYTHONPATH "$PYTHONPATH"
|
2021-01-15 13:21:58 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ exiftool vmtouch ]}"
|
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libmediainfo ]}"
|
2019-12-10 23:23:57 +00:00
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
|
|
|
"''${qtWrapperArgs[@]}"
|
|
|
|
)
|
|
|
|
'';
|
2018-03-09 09:22:37 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-03-09 09:22:37 +00:00
|
|
|
description = "Photo and video importer for cameras, phones, and memory cards";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.damonlynch.net/rapid/";
|
2021-03-22 18:26:00 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2018-03-09 09:22:37 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ jfrankenau ];
|
|
|
|
};
|
|
|
|
}
|