2022-08-14 01:31:09 +00:00
|
|
|
{ lib
|
2022-11-01 06:53:09 +00:00
|
|
|
, python3
|
2023-05-25 18:37:59 +00:00
|
|
|
, fetchPypi
|
2022-08-14 01:31:09 +00:00
|
|
|
, alsa-utils
|
|
|
|
, gobject-introspection
|
|
|
|
, libappindicator-gtk3
|
|
|
|
, libnotify
|
|
|
|
, wlrctl
|
|
|
|
, gtk3
|
2023-08-04 06:49:16 +00:00
|
|
|
, safeeyes
|
|
|
|
, testers
|
2022-08-14 01:31:09 +00:00
|
|
|
, xprintidle
|
2022-10-24 16:02:49 +00:00
|
|
|
, xprop
|
2022-08-14 01:31:09 +00:00
|
|
|
, wrapGAppsHook
|
2018-03-24 17:15:31 +00:00
|
|
|
}:
|
|
|
|
|
2022-11-01 06:53:09 +00:00
|
|
|
with python3.pkgs;
|
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
buildPythonApplication rec {
|
2018-03-24 17:15:31 +00:00
|
|
|
pname = "safeeyes";
|
2023-01-09 03:20:01 +00:00
|
|
|
version = "2.1.5";
|
2018-03-24 17:15:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-09 03:20:01 +00:00
|
|
|
sha256 = "sha256-IjFDhkqtMitdcQORerRqwty3ZMP8jamPtb9oMHdre4I=";
|
2018-03-24 17:15:31 +00:00
|
|
|
};
|
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection
|
2018-04-10 19:22:33 +00:00
|
|
|
];
|
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
libappindicator-gtk3
|
|
|
|
libnotify
|
2018-04-10 19:22:33 +00:00
|
|
|
];
|
2018-03-24 17:15:31 +00:00
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-05-08 23:53:28 +00:00
|
|
|
babel
|
2018-03-24 17:15:31 +00:00
|
|
|
psutil
|
|
|
|
xlib
|
|
|
|
pygobject3
|
|
|
|
dbus-python
|
2021-04-23 16:50:29 +00:00
|
|
|
croniter
|
2018-03-24 17:15:31 +00:00
|
|
|
];
|
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
# Prevent double wrapping, let the Python wrapper use the args in preFixup.
|
|
|
|
dontWrapGApps = true;
|
2018-03-24 17:15:31 +00:00
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp -r safeeyes/platform/icons $out/share/icons/
|
|
|
|
cp safeeyes/platform/safeeyes.desktop $out/share/applications/safeeyes.desktop
|
2018-03-24 17:15:31 +00:00
|
|
|
'';
|
|
|
|
|
2018-04-10 19:22:33 +00:00
|
|
|
preFixup = ''
|
2022-08-14 01:31:09 +00:00
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2022-10-24 16:02:49 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ alsa-utils wlrctl xprintidle xprop ]}
|
2018-04-10 19:22:33 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # no tests
|
2018-03-24 17:15:31 +00:00
|
|
|
|
2023-08-04 06:49:16 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = safeeyes; };
|
|
|
|
|
2022-08-14 01:31:09 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://slgobinath.github.io/SafeEyes";
|
2018-03-24 17:15:31 +00: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";
|
2022-08-14 01:31:09 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ srghma ];
|
|
|
|
platforms = platforms.linux;
|
2023-08-03 12:31:09 +00:00
|
|
|
mainProgram = "safeeyes";
|
2018-03-24 17:15:31 +00:00
|
|
|
};
|
|
|
|
}
|