summary refs log tree commit diff
path: root/pkgs/applications/misc/variety/default.nix
blob: 6d8da4a1007a3ae389d30502d06059ddc561790b (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
72
73
{
  fehSupport ? false, feh
, imagemagickSupport ? true, imagemagick
, stdenv
, lib
, python37Packages
, fetchFromGitHub
, intltool
, gtk3
, gexiv2
, libnotify
, wrapGAppsHook
, gobject-introspection
, hicolor-icon-theme
, librsvg
}:

with python37Packages;

buildPythonApplication rec {
  pname = "variety";
  version = "0.7.2-96-g3afe3ab";

  src = fetchFromGitHub {
    owner = "varietywalls";
    repo = "variety";
    rev = "3afe3abf725e5db2aec0db575a17c9907ab20de1";
    sha256 = "10vw0202dwrwi497nsbq077v4qd3qn5b8cmkfcsgbvvjwlz7ldm5";
  };

  nativeBuildInputs = [ intltool wrapGAppsHook ];

  buildInputs = [ distutils_extra ];

  doCheck = false;

  prePatch = ''
    substituteInPlace variety_lib/varietyconfig.py \
      --replace "__variety_data_directory__ = \"../data\"" "__variety_data_directory__ = \"$out/share/variety\""
    substituteInPlace data/scripts/set_wallpaper \
      --replace /bin/bash ${stdenv.shell}
    substituteInPlace data/scripts/get_wallpaper \
      --replace /bin/bash ${stdenv.shell}
  '';

  propagatedBuildInputs =
       [ gtk3
         gexiv2
         libnotify
         beautifulsoup4
         lxml
         pycairo
         pygobject3
         configobj
         pillow
         setuptools
         requests
         httplib2
         dbus-python
         gobject-introspection
         hicolor-icon-theme
         librsvg
       ]
    ++ lib.optional fehSupport feh
    ++ lib.optional imagemagickSupport imagemagick;

  meta = with lib; {
    description = "A wallpaper manager for Linux systems. It supports numerous desktops and wallpaper sources, including local files and online services: Flickr, Wallhaven, Unsplash, and more";
    homepage = https://github.com/varietywalls/variety;
    license = licenses.gpl3;
    maintainers = [ maintainers.zfnmxt ];
  };
}