From 58e1a4a3839ca2fdc1c5365a2a2bfb2bb9450fd0 Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Thu, 16 Oct 2025 13:54:34 -0700 Subject: [PATCH 1/2] safeeyes: 2.2.3 -> 3.2.0 --- pkgs/by-name/sa/safeeyes/package.nix | 34 ++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/sa/safeeyes/package.nix b/pkgs/by-name/sa/safeeyes/package.nix index 8192162159f8..69e6d015ac24 100644 --- a/pkgs/by-name/sa/safeeyes/package.nix +++ b/pkgs/by-name/sa/safeeyes/package.nix @@ -6,35 +6,35 @@ gobject-introspection, libnotify, wlrctl, - gtk3, + gtk4, + gettext, safeeyes, testers, xprintidle, xprop, wrapGAppsHook3, + versionCheckHook, + nix-update-script, }: python3.pkgs.buildPythonApplication rec { pname = "safeeyes"; - version = "2.2.3"; + version = "3.2.0"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-VE+pcCSblj5CADJppyM1mUchOibUtr7NrVwINrSprY0="; + hash = "sha256-t8PMQxQjfyW3t0bamo8kAlminAMfUe0ThtzrgUc33Xo="; }; - postPatch = '' - substituteInPlace setup.py --replace-fail "root_dir = sys.prefix" "root_dir = '/'" - ''; - nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ]; buildInputs = [ - gtk3 + gtk4 + gettext libnotify ]; @@ -46,17 +46,17 @@ python3.pkgs.buildPythonApplication rec { xlib pygobject3 dbus-python - croniter packaging ]; + optional-dependencies = with python3.pkgs; { + healthstats = [ croniter ]; + wayland = [ pywayland ]; + }; + # Prevent double wrapping, let the Python wrapper use the args in preFixup. dontWrapGApps = true; - postInstall = '' - mv $out/lib/python*/site-packages/share $out/share - ''; - preFixup = '' makeWrapperArgs+=( "''${gappsWrapperArgs[@]}" @@ -75,7 +75,13 @@ python3.pkgs.buildPythonApplication rec { 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 = { homepage = "http://slgobinath.github.io/SafeEyes"; From 5fd15d2480c0e35842d11635daebe37b62d73176 Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Thu, 16 Oct 2025 14:28:42 -0700 Subject: [PATCH 2/2] safeeyes: cleanup --- pkgs/by-name/sa/safeeyes/package.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/sa/safeeyes/package.nix b/pkgs/by-name/sa/safeeyes/package.nix index 69e6d015ac24..f3170d96e093 100644 --- a/pkgs/by-name/sa/safeeyes/package.nix +++ b/pkgs/by-name/sa/safeeyes/package.nix @@ -1,6 +1,6 @@ { lib, - python3, + python3Packages, fetchPypi, alsa-utils, gobject-introspection, @@ -17,7 +17,7 @@ nix-update-script, }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "safeeyes"; version = "3.2.0"; pyproject = true; @@ -38,9 +38,9 @@ python3.pkgs.buildPythonApplication rec { libnotify ]; - build-system = with python3.pkgs; [ setuptools ]; + build-system = with python3Packages; [ setuptools ]; - dependencies = with python3.pkgs; [ + dependencies = with python3Packages; [ babel psutil xlib @@ -49,7 +49,7 @@ python3.pkgs.buildPythonApplication rec { packaging ]; - optional-dependencies = with python3.pkgs; { + optional-dependencies = with python3Packages; { healthstats = [ croniter ]; wayland = [ pywayland ]; }; @@ -85,8 +85,13 @@ python3.pkgs.buildPythonApplication rec { meta = { 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; + description = "Break reminder to prevent eye strain"; + 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; mainProgram = "safeeyes"; };