diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-09-14 12:30:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-14 12:30:09 +0200 |
commit | c1831f6c90a4ce69b4b50069b62805de28fced98 (patch) | |
tree | 8e45edb13695e1cb0dcf23e4e863babafa245909 /pkgs | |
parent | f040a9d34d21d2c99e51455d3813eb5863b1a340 (diff) | |
parent | f411f4ae7a034e654b603c16c25ec10c33869af5 (diff) | |
download | nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.tar nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.tar.gz nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.tar.bz2 nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.tar.lz nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.tar.xz nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.tar.zst nixpkgs-c1831f6c90a4ce69b4b50069b62805de28fced98.zip |
Merge pull request #182329 from linsui/safeeyes
safeeyes: fix double wrap
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/misc/safeeyes/default.nix | 76 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 41 insertions, 39 deletions
diff --git a/pkgs/applications/misc/safeeyes/default.nix b/pkgs/applications/misc/safeeyes/default.nix index 4a063eb8edd..3740946db85 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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a48ddadeb17..b3d0d25b8b1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10767,7 +10767,7 @@ with pkgs; safe-rm = callPackage ../tools/system/safe-rm { }; - safeeyes = callPackage ../applications/misc/safeeyes { }; + safeeyes = with python3.pkgs; toPythonApplication safeeyes; sahel-fonts = callPackage ../data/fonts/sahel-fonts { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5e3c71d062e..65a387a1310 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9781,6 +9781,8 @@ in { safe = callPackage ../development/python-modules/safe { }; + safeeyes = callPackage ../applications/misc/safeeyes { }; + safeio = callPackage ../development/python-modules/safeio { }; safety = callPackage ../development/python-modules/safety { }; |