nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4, gexiv2
5, gobject-introspection
6, gtk3
7, hicolor-icon-theme
8, intltool
9, libnotify
10, librsvg
11, python3
12, runtimeShell
13, wrapGAppsHook
14, fehSupport ? false
15, feh
16, imagemagickSupport ? true
17, imagemagick
18, appindicatorSupport ? true
19, libayatana-appindicator
20}:
21
22python3.pkgs.buildPythonApplication rec {
23 pname = "variety";
24 version = "0.8.10";
25
26 src = fetchFromGitHub {
27 owner = "varietywalls";
28 repo = "variety";
29 rev = "refs/tags/${version}";
30 hash = "sha256-Uln0uoaEZgV9FN3HEBTeFOD7d6RkAQLgQZw7bcgu26A=";
31 };
32
33 nativeBuildInputs = [
34 intltool
35 wrapGAppsHook
36 gobject-introspection
37 ];
38
39 buildInputs = [
40 gexiv2
41 gobject-introspection
42 gtk3
43 hicolor-icon-theme
44 libnotify
45 librsvg
46 ]
47 ++ lib.optional appindicatorSupport libayatana-appindicator;
48
49 propagatedBuildInputs = with python3.pkgs; [
50 beautifulsoup4
51 configobj
52 dbus-python
53 distutils_extra
54 httplib2
55 lxml
56 pillow
57 pycairo
58 pygobject3
59 requests
60 setuptools
61 ]
62 ++ lib.optional fehSupport feh
63 ++ lib.optional imagemagickSupport imagemagick;
64
65 doCheck = false;
66
67 # Prevent double wrapping, let the Python wrapper use the args in preFixup.
68 dontWrapGApps = true;
69
70 preFixup = ''
71 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
72 '';
73
74 prePatch = ''
75 substituteInPlace variety_lib/varietyconfig.py \
76 --replace "__variety_data_directory__ = \"../data\"" \
77 "__variety_data_directory__ = \"$out/share/variety\""
78 substituteInPlace data/scripts/set_wallpaper \
79 --replace /bin/bash ${runtimeShell}
80 substituteInPlace data/scripts/get_wallpaper \
81 --replace /bin/bash ${runtimeShell}
82 '';
83
84 meta = with lib; {
85 homepage = "https://github.com/varietywalls/variety";
86 description = "A wallpaper manager for Linux systems";
87 longDescription = ''
88 Variety is a wallpaper manager for Linux systems. It supports numerous
89 desktops and wallpaper sources, including local files and online services:
90 Flickr, Wallhaven, Unsplash, and more.
91
92 Where supported, Variety sits as a tray icon to allow easy pausing and
93 resuming. Otherwise, its desktop entry menu provides a similar set of
94 options.
95
96 Variety also includes a range of image effects, such as oil painting and
97 blur, as well as options to layer quotes and a clock onto the background.
98 '';
99 license = licenses.gpl3Plus;
100 maintainers = with maintainers; [ p3psi AndersonTorres zfnmxt ];
101 };
102}