nixpkgs/pkgs/applications/misc/safeeyes/default.nix

71 lines
1.7 KiB
Nix
Raw Normal View History

2019-05-22 13:03:39 +02:00
{ lib, python3Packages, gobject-introspection, libappindicator-gtk3, libnotify, gtk3, gnome3, xprintidle-ng, wrapGAppsHook, gdk-pixbuf, shared-mime-info, librsvg
2018-03-24 18:15:31 +01:00
}:
let inherit (python3Packages) python buildPythonApplication fetchPypi;
in buildPythonApplication rec {
pname = "safeeyes";
version = "2.0.9";
2018-03-24 18:15:31 +01:00
namePrefix = "";
src = fetchPypi {
inherit pname version;
sha256 = "13q06jv8hm0dynmr3g5pf1m4j3w9iabrpz1nhpl02f7x0d90whg2";
2018-03-24 18:15:31 +01:00
};
2018-04-10 21:22:33 +02:00
buildInputs = [
gtk3
gobject-introspection
2019-02-13 22:47:50 +01:00
gnome3.adwaita-icon-theme
2018-04-10 21:22:33 +02:00
gnome3.adwaita-icon-theme
];
nativeBuildInputs = [
wrapGAppsHook
];
2018-03-24 18:15:31 +01:00
propagatedBuildInputs = with python3Packages; [
Babel
psutil
xlib
pygobject3
dbus-python
libappindicator-gtk3
2018-04-10 20:57:24 +02:00
libnotify
2018-03-24 18:15:31 +01:00
xprintidle-ng
];
# patch smartpause plugin
postPatch = ''
sed -i \
2018-04-04 22:15:16 +02:00
-e 's!xprintidle!xprintidle-ng!g' \
2018-03-24 18:15:31 +01:00
safeeyes/plugins/smartpause/plugin.py
sed -i \
2018-04-04 22:15:16 +02:00
-e 's!xprintidle!xprintidle-ng!g' \
2018-03-24 18:15:31 +01:00
safeeyes/plugins/smartpause/config.json
'';
2018-04-10 21:22:33 +02:00
preFixup = ''
gappsWrapperArgs+=(
2019-05-22 13:03:39 +02:00
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
2018-04-10 21:22:33 +02:00
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
--prefix XDG_DATA_DIRS : "${librsvg}/share"
2018-03-24 18:15:31 +01:00
2018-04-10 21:22:33 +02:00
# safeeyes images
--prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share"
)
'';
doCheck = false; # no tests
2018-03-24 18:15:31 +01:00
meta = {
homepage = "http://slgobinath.github.io/SafeEyes";
2018-03-24 18:15:31 +01:00
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 11:43:28 +02:00
maintainers = with lib.maintainers; [ srghma ];
2018-03-24 18:15:31 +01:00
platforms = lib.platforms.all;
};
}