Merge pull request #37737 from srghma/safeeyes

safeeyes: init at 2.0.2
This commit is contained in:
Matthew Justin Bauer 2018-04-10 14:35:07 -05:00 committed by GitHub
commit 04662c1d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 131 additions and 2 deletions

View File

@ -4130,4 +4130,9 @@
github = "zzamboni";
name = "Diego Zamboni";
};
srghma = {
email = "srghma@gmail.com";
github = "srghma";
name = "Sergei Khoma";
};
}

View File

@ -366,6 +366,7 @@
./services/misc/ripple-data-api.nix
./services/misc/rogue.nix
./services/misc/serviio.nix
./services/misc/safeeyes.nix
./services/misc/siproxd.nix
./services/misc/snapper.nix
./services/misc/sonarr.nix

View File

@ -0,0 +1,50 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.safeeyes;
in
{
###### interface
options = {
services.safeeyes = {
enable = mkOption {
default = false;
description = "Whether to enable the safeeyes OSGi service";
};
};
};
###### implementation
config = mkIf cfg.enable {
systemd.user.services.safeeyes = {
description = "Safeeyes";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.safeeyes}/bin/safeeyes
'';
Restart = "on-failure";
RestartSec = 3;
StartLimitInterval = 350;
StartLimitBurst = 10;
};
};
};
}

View File

@ -0,0 +1,71 @@
{ lib, python3Packages, gobjectIntrospection, libappindicator-gtk3, libnotify, gtk3, gnome3, xprintidle-ng, wrapGAppsHook, gdk_pixbuf, shared-mime-info, librsvg
}:
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
gnome3.adwaita-icon-theme
];
nativeBuildInputs = [
wrapGAppsHook
];
propagatedBuildInputs = with python3Packages; [
Babel
psutil
xlib
pygobject3
dbus-python
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"
)
'';
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;
};
}

View File

@ -629,9 +629,9 @@ with pkgs;
encryptr = callPackage ../tools/security/encryptr {
gconf = gnome2.GConf;
};
};
enchive = callPackage ../tools/security/enchive { };
enchive = callPackage ../tools/security/enchive { };
enpass = callPackage ../tools/security/enpass { };
@ -4723,6 +4723,8 @@ with pkgs;
safe-rm = callPackage ../tools/system/safe-rm { };
safeeyes = callPackage ../applications/misc/safeeyes { };
salt = callPackage ../tools/admin/salt {};
salut_a_toi = callPackage ../applications/networking/instant-messengers/salut-a-toi {};