2021-05-20 23:08:51 +00:00
|
|
|
{ lib, python3Packages, gobject-introspection, libappindicator-gtk3, libnotify, gtk3, gnome, xprintidle-ng, wrapGAppsHook, gdk-pixbuf, shared-mime-info, librsvg
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
let inherit (python3Packages) python buildPythonApplication fetchPypi croniter;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
in buildPythonApplication rec {
|
|
|
|
pname = "safeeyes";
|
2021-04-25 03:57:28 +00:00
|
|
|
version = "2.1.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-25 03:57:28 +00:00
|
|
|
sha256 = "1b5w887hivmdrkm1ydbar4nmnks6grpbbpvxgf9j9s46msj03c9x";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
gobject-introspection
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
gnome.adwaita-icon-theme
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2020-04-24 23:36:52 +00:00
|
|
|
psutil
|
|
|
|
xlib
|
|
|
|
pygobject3
|
|
|
|
dbus-python
|
2021-04-25 03:57:28 +00:00
|
|
|
croniter
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
libappindicator-gtk3
|
|
|
|
libnotify
|
|
|
|
xprintidle-ng
|
|
|
|
];
|
|
|
|
|
|
|
|
# patch smartpause plugin
|
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
|
|
|
-e 's!xprintidle!xprintidle-ng!g' \
|
|
|
|
safeeyes/plugins/smartpause/plugin.py
|
|
|
|
|
|
|
|
sed -i \
|
|
|
|
-e 's!xprintidle!xprintidle-ng!g' \
|
|
|
|
safeeyes/plugins/smartpause/config.json
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
|
|
|
|
|
|
|
# safeeyes images
|
|
|
|
--prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share"
|
|
|
|
)
|
2021-09-23 15:35:13 +00:00
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp -r safeeyes/platform/icons $out/share/
|
|
|
|
cp safeeyes/platform/safeeyes.desktop $out/share/applications/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # no tests
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with lib.maintainers; [ srghma ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|