safeeyes: 2.2.3 -> 3.2.0 (#452727)

This commit is contained in:
Sandro
2026-01-01 18:16:26 +00:00
committed by GitHub

View File

@@ -1,62 +1,62 @@
{ {
lib, lib,
python3, python3Packages,
fetchPypi, fetchPypi,
alsa-utils, alsa-utils,
gobject-introspection, gobject-introspection,
libnotify, libnotify,
wlrctl, wlrctl,
gtk3, gtk4,
gettext,
safeeyes, safeeyes,
testers, testers,
xprintidle, xprintidle,
xprop, xprop,
wrapGAppsHook3, wrapGAppsHook3,
versionCheckHook,
nix-update-script,
}: }:
python3.pkgs.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "safeeyes"; pname = "safeeyes";
version = "2.2.3"; version = "3.2.0";
pyproject = true; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-VE+pcCSblj5CADJppyM1mUchOibUtr7NrVwINrSprY0="; hash = "sha256-t8PMQxQjfyW3t0bamo8kAlminAMfUe0ThtzrgUc33Xo=";
}; };
postPatch = ''
substituteInPlace setup.py --replace-fail "root_dir = sys.prefix" "root_dir = '/'"
'';
nativeBuildInputs = [ nativeBuildInputs = [
wrapGAppsHook3 wrapGAppsHook3
gobject-introspection gobject-introspection
]; ];
buildInputs = [ buildInputs = [
gtk3 gtk4
gettext
libnotify libnotify
]; ];
build-system = with python3.pkgs; [ setuptools ]; build-system = with python3Packages; [ setuptools ];
dependencies = with python3.pkgs; [ dependencies = with python3Packages; [
babel babel
psutil psutil
xlib xlib
pygobject3 pygobject3
dbus-python dbus-python
croniter
packaging packaging
]; ];
optional-dependencies = with python3Packages; {
healthstats = [ croniter ];
wayland = [ pywayland ];
};
# Prevent double wrapping, let the Python wrapper use the args in preFixup. # Prevent double wrapping, let the Python wrapper use the args in preFixup.
dontWrapGApps = true; dontWrapGApps = true;
postInstall = ''
mv $out/lib/python*/site-packages/share $out/share
'';
preFixup = '' preFixup = ''
makeWrapperArgs+=( makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}" "''${gappsWrapperArgs[@]}"
@@ -75,12 +75,23 @@ python3.pkgs.buildPythonApplication rec {
pythonImportsCheck = [ "safeeyes" ]; pythonImportsCheck = [ "safeeyes" ];
passthru.tests.version = testers.testVersion { package = safeeyes; }; doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion { package = safeeyes; };
};
meta = { meta = {
homepage = "http://slgobinath.github.io/SafeEyes"; 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"; description = "Break reminder to prevent eye strain";
license = lib.licenses.gpl3; longDescription = ''
Protect your eyes from eye strain using this simple and
beautiful, yet extensible break reminder. Free GNU/Linux
alternative to EyeLeo.
'';
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
mainProgram = "safeeyes"; mainProgram = "safeeyes";
}; };