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