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
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
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";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.1.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-65U/j6P6X4JzhL0aEOnzKa/Al6SYprOOxix2dtcusJQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "root_dir = sys.prefix" "root_dir = '/'"
|
|
|
|
'';
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
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 = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
mv $out/lib/python*/site-packages/share $out/share
|
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
|
|
|
};
|
|
|
|
}
|