diff options
author | linsui <linsui555@gmail.com> | 2022-08-14 09:31:09 +0800 |
---|---|---|
committer | linsui <linsui555@gmail.com> | 2022-08-14 09:31:22 +0800 |
commit | f411f4ae7a034e654b603c16c25ec10c33869af5 (patch) | |
tree | 3a7212defc35fe8dbd41457a4467f796c908e3f9 /pkgs/applications/misc/safeeyes | |
parent | a50594822c73de196d148991eb110f6484fd123b (diff) |
safeeyes: fix double wrap
Diffstat (limited to 'pkgs/applications/misc/safeeyes')
-rw-r--r-- | pkgs/applications/misc/safeeyes/default.nix | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/pkgs/applications/misc/safeeyes/default.nix b/pkgs/applications/misc/safeeyes/default.nix index 4a063eb8eddbd..3740946db85de 100644 --- a/pkgs/applications/misc/safeeyes/default.nix +++ b/pkgs/applications/misc/safeeyes/default.nix @@ -1,74 +1,74 @@ -{ lib, python3Packages, gobject-introspection, libappindicator-gtk3, libnotify, gtk3, gnome, xprintidle-ng, wrapGAppsHook, gdk-pixbuf, shared-mime-info, librsvg +{ lib +, buildPythonApplication +, fetchPypi +, alsa-utils +, gobject-introspection +, libappindicator-gtk3 +, libnotify +, wlrctl +, gtk3 +, xprintidle +, wrapGAppsHook +, babel +, psutil +, xlib +, pygobject3 +, dbus-python +, croniter }: -let inherit (python3Packages) python buildPythonApplication fetchPypi croniter; - -in buildPythonApplication rec { +buildPythonApplication rec { pname = "safeeyes"; version = "2.1.3"; - namePrefix = ""; src = fetchPypi { inherit pname version; sha256 = "1b5w887hivmdrkm1ydbar4nmnks6grpbbpvxgf9j9s46msj03c9x"; }; - buildInputs = [ - gtk3 + nativeBuildInputs = [ + wrapGAppsHook gobject-introspection - gnome.adwaita-icon-theme - gnome.adwaita-icon-theme ]; - nativeBuildInputs = [ - wrapGAppsHook + buildInputs = [ + gtk3 + libappindicator-gtk3 + libnotify ]; - propagatedBuildInputs = with python3Packages; [ + propagatedBuildInputs = [ babel psutil xlib pygobject3 dbus-python croniter - - libappindicator-gtk3 - libnotify - xprintidle-ng ]; - # patch smartpause plugin - postPatch = '' - sed -i \ - -e 's!xprintidle!xprintidle-ng!g' \ - safeeyes/plugins/smartpause/plugin.py + # Prevent double wrapping, let the Python wrapper use the args in preFixup. + dontWrapGApps = true; - sed -i \ - -e 's!xprintidle!xprintidle-ng!g' \ - safeeyes/plugins/smartpause/config.json + postInstall = '' + mkdir -p $out/share/applications + cp -r safeeyes/platform/icons $out/share/icons/ + cp safeeyes/platform/safeeyes.desktop $out/share/applications/safeeyes.desktop ''; preFixup = '' - gappsWrapperArgs+=( - --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" - --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" - --prefix XDG_DATA_DIRS : "${librsvg}/share" - - # safeeyes images - --prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share" + makeWrapperArgs+=( + "''${gappsWrapperArgs[@]}" + --prefix PATH : ${lib.makeBinPath [ alsa-utils wlrctl xprintidle ]} ) - mkdir -p $out/share/applications - cp -r safeeyes/platform/icons $out/share/ - cp safeeyes/platform/safeeyes.desktop $out/share/applications/ ''; doCheck = false; # no tests - meta = { + meta = with lib; { 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; - maintainers = with lib.maintainers; [ srghma ]; - platforms = lib.platforms.all; + license = licenses.gpl3; + maintainers = with maintainers; [ srghma ]; + platforms = platforms.linux; }; } |