summary refs log tree commit diff
path: root/pkgs/applications/graphics/rapid-photo-downloader/default.nix
blob: 4f31a10c2d1bf052176649683c4b7f4a79e77296 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ stdenv, fetchurl, python3Packages
, file, intltool, gobjectIntrospection, libgudev
, udisks, glib, gnome3, gst_all_1, libnotify
, exiv2, exiftool, qt5, gdk_pixbuf
}:

python3Packages.buildPythonApplication rec {
  pname = "rapid-photo-downloader";
  version = "0.9.9";

  src = fetchurl {
    url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
    sha256 = "193l55wdxwxmammyxwzp90sg0qw5r316443la3m9611sdpcmy8w3";
  };

  # 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"
    substituteInPlace raphodo/copyfiles.py \
      --replace "import problemnotification" "import raphodo.problemnotification"
  '';

  nativeBuildInputs = [ file intltool gobjectIntrospection ];

  buildInputs = [
    libgudev
    udisks
    glib
    gnome3.gexiv2
    gst_all_1.gstreamer
    libnotify
    exiv2
    exiftool
    qt5.qtimageformats
    gdk_pixbuf
  ] ++ (with python3Packages; [
    pyqt5
    pygobject3
    gphoto2
    pyzmq
    tornado
    psutil
    pyxdg
    arrow
    dateutil
    easygui
    colour
    pymediainfo
    sortedcontainers
    rawkit
    requests
    colorlog
    pyprind
  ]);

  makeWrapperArgs = [
    "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
    "--set PYTHONPATH \"$PYTHONPATH\""
  ];

  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 ];
  };
}