diff options
author | Ambroz Bizjak <abizjak.pro@gmail.com> | 2019-06-27 13:02:53 +0200 |
---|---|---|
committer | Matthieu Coudron <coudron@iij.ad.jp> | 2019-07-13 03:44:38 +0200 |
commit | f93c5deb47ae7da3e04abb121dfb162a82f4551c (patch) | |
tree | 095c2b5189ccf62472cf2bda443e05e1a42c7f87 | |
parent | 2d7bce29d17747ed77eb0ef98f8aef63b3cd34d6 (diff) |
nvidia-settings: Install desktop file and icon.
The template has substitution variables intended to be replaced resulting in absolute paths. Because absolute paths break after the desktop file is copied by a desktop environment, make Exec and Icon be just a name.
-rw-r--r-- | pkgs/os-specific/linux/nvidia-x11/settings.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix index 5420a651c7943..1867c1a133af3 100644 --- a/pkgs/os-specific/linux/nvidia-x11/settings.nix +++ b/pkgs/os-specific/linux/nvidia-x11/settings.nix @@ -72,6 +72,17 @@ stdenv.mkDerivation rec { ${lib.optionalString (!withGtk3) '' rm -f $out/lib/libnvidia-gtk3.so.* ''} + + # Install the desktop file and icon. + # The template has substitution variables intended to be replaced resulting + # in absolute paths. Because absolute paths break after the desktop file is + # copied by a desktop environment, make Exec and Icon be just a name. + sed -i doc/nvidia-settings.desktop \ + -e "s|^Exec=.*$|Exec=nvidia-settings|" \ + -e "s|^Icon=.*$|Icon=nvidia-settings|" \ + -e "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Settings|g" + install doc/nvidia-settings.desktop -D -t $out/share/applications/ + install doc/nvidia-settings.png -D -t $out/share/icons/hicolor/128x128/apps/ ''; binaryName = if withGtk3 then ".nvidia-settings-wrapped" else "nvidia-settings"; |