2018-04-10 19:22:33 +00:00
|
|
|
{ lib, python3Packages, gobjectIntrospection, libappindicator-gtk3, libnotify, gtk3, gnome3, xprintidle-ng, wrapGAppsHook, gdk_pixbuf, shared-mime-info, librsvg
|
2018-03-24 17:15:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let inherit (python3Packages) python buildPythonApplication fetchPypi;
|
|
|
|
|
|
|
|
in buildPythonApplication rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "safeeyes";
|
2018-06-27 20:11:04 +00:00
|
|
|
version = "2.0.6";
|
2018-03-24 17:15:31 +00:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-27 20:11:04 +00:00
|
|
|
sha256 = "0s14pxicgq33srvhf6bvfq48wv3z4rlsmzkccz4ky9vh3gfx7zka";
|
2018-03-24 17:15:31 +00:00
|
|
|
};
|
|
|
|
|
2018-04-10 19:22:33 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
gobjectIntrospection
|
|
|
|
gnome3.defaultIconTheme
|
|
|
|
gnome3.adwaita-icon-theme
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
2018-03-24 17:15:31 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
Babel
|
|
|
|
psutil
|
|
|
|
xlib
|
|
|
|
pygobject3
|
|
|
|
dbus-python
|
|
|
|
|
|
|
|
libappindicator-gtk3
|
2018-04-10 18:57:24 +00:00
|
|
|
libnotify
|
2018-03-24 17:15:31 +00:00
|
|
|
xprintidle-ng
|
|
|
|
];
|
|
|
|
|
|
|
|
# patch smartpause plugin
|
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
2018-04-04 20:15:16 +00:00
|
|
|
-e 's!xprintidle!xprintidle-ng!g' \
|
2018-03-24 17:15:31 +00:00
|
|
|
safeeyes/plugins/smartpause/plugin.py
|
|
|
|
|
|
|
|
sed -i \
|
2018-04-04 20:15:16 +00:00
|
|
|
-e 's!xprintidle!xprintidle-ng!g' \
|
2018-03-24 17:15:31 +00:00
|
|
|
safeeyes/plugins/smartpause/config.json
|
|
|
|
'';
|
|
|
|
|
2018-04-10 19:22:33 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_DATA_DIRS : "${gdk_pixbuf}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
2018-03-24 17:15:31 +00:00
|
|
|
|
2018-04-10 19:22:33 +00:00
|
|
|
# safeeyes images
|
|
|
|
--prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # no tests
|
2018-03-24 17:15:31 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://slgobinath.github.io/SafeEyes;
|
|
|
|
description = "Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder. A Free and Open Source Linux alternative to EyeLeo";
|
|
|
|
license = lib.licenses.gpl3;
|
2018-04-01 09:43:28 +00:00
|
|
|
maintainers = with lib.maintainers; [ srghma ];
|
2018-03-24 17:15:31 +00:00
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|