mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
commit
04662c1d46
@ -4130,4 +4130,9 @@
|
||||
github = "zzamboni";
|
||||
name = "Diego Zamboni";
|
||||
};
|
||||
srghma = {
|
||||
email = "srghma@gmail.com";
|
||||
github = "srghma";
|
||||
name = "Sergei Khoma";
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
|
50
nixos/modules/services/misc/safeeyes.nix
Normal file
50
nixos/modules/services/misc/safeeyes.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
71
pkgs/applications/misc/safeeyes/default.nix
Normal file
71
pkgs/applications/misc/safeeyes/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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 {};
|
||||
|
Loading…
Reference in New Issue
Block a user