2022-01-13 14:37:58 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2019-10-04 10:10:22 +00:00
|
|
|
, gexiv2
|
|
|
|
, gobject-introspection
|
2022-01-13 14:37:58 +00:00
|
|
|
, gtk3
|
2019-10-04 10:10:22 +00:00
|
|
|
, hicolor-icon-theme
|
2022-01-13 14:37:58 +00:00
|
|
|
, intltool
|
|
|
|
, libnotify
|
2019-10-04 10:10:22 +00:00
|
|
|
, librsvg
|
2022-01-13 14:37:58 +00:00
|
|
|
, python3
|
|
|
|
, runtimeShell
|
2020-12-29 01:14:00 +00:00
|
|
|
, wrapGAppsHook
|
2022-09-03 16:21:38 +00:00
|
|
|
, fehSupport ? false
|
|
|
|
, feh
|
|
|
|
, imagemagickSupport ? true
|
|
|
|
, imagemagick
|
2022-09-12 06:38:14 +00:00
|
|
|
, appindicatorSupport ? true
|
2022-10-18 12:13:06 +00:00
|
|
|
, libayatana-appindicator
|
2019-10-04 10:10:22 +00:00
|
|
|
}:
|
|
|
|
|
2022-01-13 14:37:58 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2019-10-04 10:10:22 +00:00
|
|
|
pname = "variety";
|
2022-08-19 19:56:55 +00:00
|
|
|
version = "0.8.9";
|
2019-10-04 10:10:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "varietywalls";
|
|
|
|
repo = "variety";
|
2022-08-19 19:56:55 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-Tm8RXn2S/NDUD3JWeCHKqSFkxZPJdNMojPGnU4WEpr0=";
|
2019-10-04 10:10:22 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 14:37:58 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
intltool
|
|
|
|
wrapGAppsHook
|
2022-09-03 16:21:38 +00:00
|
|
|
gobject-introspection
|
2022-01-13 14:37:58 +00:00
|
|
|
];
|
2019-10-04 10:10:22 +00:00
|
|
|
|
2022-09-03 16:21:38 +00:00
|
|
|
buildInputs = [
|
|
|
|
gexiv2
|
|
|
|
gobject-introspection
|
|
|
|
gtk3
|
|
|
|
hicolor-icon-theme
|
|
|
|
libnotify
|
|
|
|
librsvg
|
2022-09-12 06:38:14 +00:00
|
|
|
]
|
2022-10-18 12:13:06 +00:00
|
|
|
++ lib.optional appindicatorSupport libayatana-appindicator;
|
2022-09-03 16:21:38 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-01-13 14:37:58 +00:00
|
|
|
beautifulsoup4
|
|
|
|
configobj
|
|
|
|
dbus-python
|
|
|
|
distutils_extra
|
|
|
|
httplib2
|
|
|
|
lxml
|
|
|
|
pillow
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
|
|
|
requests
|
|
|
|
setuptools
|
2022-09-03 16:21:38 +00:00
|
|
|
]
|
2022-01-13 14:37:58 +00:00
|
|
|
++ lib.optional fehSupport feh
|
|
|
|
++ lib.optional imagemagickSupport imagemagick;
|
2019-10-04 10:10:22 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-09-03 16:21:38 +00:00
|
|
|
# Prevent double wrapping, let the Python wrapper use the args in preFixup.
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2021-06-13 04:17:29 +00:00
|
|
|
'';
|
2021-06-04 12:16:19 +00:00
|
|
|
|
2019-10-04 10:10:22 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace variety_lib/varietyconfig.py \
|
2022-01-13 14:37:58 +00:00
|
|
|
--replace "__variety_data_directory__ = \"../data\"" \
|
|
|
|
"__variety_data_directory__ = \"$out/share/variety\""
|
2019-10-04 10:10:22 +00:00
|
|
|
substituteInPlace data/scripts/set_wallpaper \
|
2022-01-13 14:37:58 +00:00
|
|
|
--replace /bin/bash ${runtimeShell}
|
2019-10-04 10:10:22 +00:00
|
|
|
substituteInPlace data/scripts/get_wallpaper \
|
2022-01-13 14:37:58 +00:00
|
|
|
--replace /bin/bash ${runtimeShell}
|
2019-10-04 10:10:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/varietywalls/variety";
|
2020-12-29 01:14:00 +00:00
|
|
|
description = "A wallpaper manager for Linux systems";
|
|
|
|
longDescription = ''
|
|
|
|
Variety is a wallpaper manager for Linux systems. It supports numerous
|
|
|
|
desktops and wallpaper sources, including local files and online services:
|
|
|
|
Flickr, Wallhaven, Unsplash, and more.
|
|
|
|
|
|
|
|
Where supported, Variety sits as a tray icon to allow easy pausing and
|
|
|
|
resuming. Otherwise, its desktop entry menu provides a similar set of
|
|
|
|
options.
|
|
|
|
|
|
|
|
Variety also includes a range of image effects, such as oil painting and
|
|
|
|
blur, as well as options to layer quotes and a clock onto the background.
|
|
|
|
'';
|
2022-01-13 14:37:58 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-06-04 12:16:19 +00:00
|
|
|
maintainers = with maintainers; [ p3psi AndersonTorres zfnmxt ];
|
2019-10-04 10:10:22 +00:00
|
|
|
};
|
|
|
|
}
|