diff options
author | BjornMelgaard <melgaardbjorn@gmail.com> | 2018-03-24 19:15:31 +0200 |
---|---|---|
committer | BjornMelgaard <melgaardbjorn@gmail.com> | 2018-04-10 21:19:13 +0300 |
commit | e00f9b316b2f9e1b1d5ed1a33fc97a0058bd5ae6 (patch) | |
tree | 67e31751f81f122e0ac0e22cfdbc2c77870016a6 /pkgs/applications | |
parent | d0945011ae27ff6d250a23418337439009343306 (diff) |
safeeyes: init at 2.0.2
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/safeeyes/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/misc/safeeyes/default.nix b/pkgs/applications/misc/safeeyes/default.nix new file mode 100644 index 0000000000000..0f60916891ca9 --- /dev/null +++ b/pkgs/applications/misc/safeeyes/default.nix @@ -0,0 +1,57 @@ +{ lib, python3Packages, gobjectIntrospection, libappindicator-gtk3, gtk3, gnome3, xprintidle-ng +}: + +let inherit (python3Packages) python buildPythonApplication fetchPypi; + +in buildPythonApplication rec { + name = "${pname}-${version}"; + pname = "safeeyes"; + version = "2.0.2"; + namePrefix = ""; + + src = fetchPypi { + inherit pname version; + sha256 = "1fx6zd4hnbc7gdpac6r7smxwdl1bifaxx3mnx0wrqfvhpnwr1ybv"; + }; + + buildInputs = [ gtk3 gobjectIntrospection gnome3.defaultIconTheme ]; + + propagatedBuildInputs = with python3Packages; [ + Babel + psutil + xlib + pygobject3 + dbus-python + + libappindicator-gtk3 + xprintidle-ng + ]; + + # patch smartpause plugin + postPatch = '' + sed -i \ + -e 's!xprintidle!${xprintidle-ng}/bin/xprintidle-ng!g' \ + safeeyes/plugins/smartpause/plugin.py + + sed -i \ + -e 's!xprintidle!${xprintidle-ng}/bin/xprintidle-ng!g' \ + safeeyes/plugins/smartpause/config.json + ''; + + doCheck = false; + + makeWrapperArgs = [ + "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" + "--set GDK_PIXBUF_MODULE_FILE \"$GDK_PIXBUF_MODULE_FILE\"" + "--prefix XDG_DATA_DIRS : \"$out/lib/${python.libPrefix}/site-packages/usr/share\"" + "--suffix XDG_DATA_DIRS : \"$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\"" + ]; + + 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 = [ ]; + platforms = lib.platforms.all; + }; +} |