cinnamon.cinnamon-common: fix all hardcode absolute paths in applets

This will be helpful to the a11y and the printer applet.
This commit is contained in:
Bobby Rong 2023-06-04 17:38:12 +08:00
parent 7409480d5c
commit 924193b5e3
No known key found for this signature in database

View File

@ -155,13 +155,15 @@ stdenv.mkDerivation rec {
-e s,/usr/share/locale,/run/current-system/sw/share/locale,g \
{} +
# All optional and may introduce circular dependency.
find ./files/usr/share/cinnamon/applets -type f -exec sed -i \
-e '/^#/!s,/usr/bin,/run/current-system/sw/bin,g' \
{} +
sed "s|/usr/share/sounds|/run/current-system/sw/share/sounds|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py
sed "s|'python3'|'${pythonEnv.interpreter}'|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py
sed "s|/usr/bin/cinnamon-screensaver-command|/run/current-system/sw/bin/cinnamon-screensaver-command|g" \
-i ./files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js -i ./files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js
sed "s|\"/usr/lib\"|\"${cinnamon-control-center}/lib\"|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/capi.py
sed 's|"lspci"|"${pciutils}/bin/lspci"|g' -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py