nixpkgs-suyu/pkgs/applications/graphics/rapid-photo-downloader/default.nix

87 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv, mkDerivationWith, fetchurl, python3Packages
, file, intltool, gobject-introspection, libgudev
, udisks, gexiv2, gst_all_1, libnotify
2019-05-22 13:03:39 +02:00
, exiftool, gdk-pixbuf, libmediainfo, vmtouch
2018-03-09 10:22:37 +01:00
}:
mkDerivationWith python3Packages.buildPythonApplication rec {
2018-03-09 10:22:37 +01:00
pname = "rapid-photo-downloader";
version = "0.9.16";
2018-03-09 10:22:37 +01:00
src = fetchurl {
url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "0ij3li17jcqjx79ldv6zg2ckn8m2l9n4xvvq2x79y4q8yx9fqg85";
2018-03-09 10:22:37 +01: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"
'';
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 10:22:37 +01:00
# NOTE: Without gobject-introspection in buildInputs, launching fails with
# "Namespace [Notify / GExiv2 / GUdev] not available"
2018-03-09 10:22:37 +01:00
buildInputs = [
2019-05-22 13:03:39 +02:00
gdk-pixbuf
gexiv2
gobject-introspection
gst_all_1.gst-libav
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
2018-03-09 10:22:37 +01:00
gst_all_1.gstreamer
gst_all_1.gstreamer.dev
libgudev
2018-03-09 10:22:37 +01:00
libnotify
udisks
];
propagatedBuildInputs = with python3Packages; [
2018-03-09 10:22:37 +01:00
pyqt5
pygobject3
gphoto2
pyzmq
tornado
psutil
pyxdg
arrow
dateutil
easygui
colour
pymediainfo
sortedcontainers
rawkit
requests
colorlog
pyprind
tenacity
];
2018-03-09 10:22:37 +01:00
makeWrapperArgs = [
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
"--set PYTHONPATH \"$PYTHONPATH\""
"--prefix PATH : ${stdenv.lib.makeBinPath [ exiftool vmtouch ]}"
"--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libmediainfo ]}"
"--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
"\${qtWrapperArgs[@]}"
2018-03-09 10:22:37 +01:00
];
meta = with stdenv.lib; {
description = "Photo and video importer for cameras, phones, and memory cards";
homepage = http://www.damonlynch.net/rapid/;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ jfrankenau ];
};
}