forked from mirrors/nixpkgs
safeeyes: fix double wrap
This commit is contained in:
parent
a50594822c
commit
f411f4ae7a
|
@ -34,8 +34,6 @@ in
|
|||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
|
||||
path = [ pkgs.alsa-utils ];
|
||||
|
||||
startLimitIntervalSec = 350;
|
||||
startLimitBurst = 10;
|
||||
serviceConfig = {
|
||||
|
|
|
@ -1,74 +1,74 @@
|
|||
{ lib, python3Packages, gobject-introspection, libappindicator-gtk3, libnotify, gtk3, gnome, xprintidle-ng, wrapGAppsHook, gdk-pixbuf, shared-mime-info, librsvg
|
||||
{ lib
|
||||
, buildPythonApplication
|
||||
, fetchPypi
|
||||
, alsa-utils
|
||||
, gobject-introspection
|
||||
, libappindicator-gtk3
|
||||
, libnotify
|
||||
, wlrctl
|
||||
, gtk3
|
||||
, xprintidle
|
||||
, wrapGAppsHook
|
||||
, babel
|
||||
, psutil
|
||||
, xlib
|
||||
, pygobject3
|
||||
, dbus-python
|
||||
, croniter
|
||||
}:
|
||||
|
||||
let inherit (python3Packages) python buildPythonApplication fetchPypi croniter;
|
||||
|
||||
in buildPythonApplication rec {
|
||||
buildPythonApplication rec {
|
||||
pname = "safeeyes";
|
||||
version = "2.1.3";
|
||||
namePrefix = "";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1b5w887hivmdrkm1ydbar4nmnks6grpbbpvxgf9j9s46msj03c9x";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gobject-introspection
|
||||
gnome.adwaita-icon-theme
|
||||
gnome.adwaita-icon-theme
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
buildInputs = [
|
||||
gtk3
|
||||
libappindicator-gtk3
|
||||
libnotify
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
babel
|
||||
psutil
|
||||
xlib
|
||||
pygobject3
|
||||
dbus-python
|
||||
croniter
|
||||
|
||||
libappindicator-gtk3
|
||||
libnotify
|
||||
xprintidle-ng
|
||||
];
|
||||
|
||||
# patch smartpause plugin
|
||||
postPatch = ''
|
||||
sed -i \
|
||||
-e 's!xprintidle!xprintidle-ng!g' \
|
||||
safeeyes/plugins/smartpause/plugin.py
|
||||
# Prevent double wrapping, let the Python wrapper use the args in preFixup.
|
||||
dontWrapGApps = true;
|
||||
|
||||
sed -i \
|
||||
-e 's!xprintidle!xprintidle-ng!g' \
|
||||
safeeyes/plugins/smartpause/config.json
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/applications
|
||||
cp -r safeeyes/platform/icons $out/share/icons/
|
||||
cp safeeyes/platform/safeeyes.desktop $out/share/applications/safeeyes.desktop
|
||||
'';
|
||||
|
||||
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"
|
||||
makeWrapperArgs+=(
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
--prefix PATH : ${lib.makeBinPath [ alsa-utils wlrctl xprintidle ]}
|
||||
)
|
||||
mkdir -p $out/share/applications
|
||||
cp -r safeeyes/platform/icons $out/share/
|
||||
cp safeeyes/platform/safeeyes.desktop $out/share/applications/
|
||||
'';
|
||||
|
||||
doCheck = false; # no tests
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
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;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ srghma ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10501,7 +10501,7 @@ with pkgs;
|
|||
|
||||
safe-rm = callPackage ../tools/system/safe-rm { };
|
||||
|
||||
safeeyes = callPackage ../applications/misc/safeeyes { };
|
||||
safeeyes = with python3.pkgs; toPythonApplication safeeyes;
|
||||
|
||||
sahel-fonts = callPackage ../data/fonts/sahel-fonts { };
|
||||
|
||||
|
|
|
@ -9608,6 +9608,8 @@ in {
|
|||
|
||||
safe = callPackage ../development/python-modules/safe { };
|
||||
|
||||
safeeyes = callPackage ../applications/misc/safeeyes { };
|
||||
|
||||
safeio = callPackage ../development/python-modules/safeio { };
|
||||
|
||||
safety = callPackage ../development/python-modules/safety { };
|
||||
|
|
Loading…
Reference in a new issue