treewide: remove absolute path in desktop entry (#348601)
This commit is contained in:
commit
ab20acce15
@ -61,11 +61,6 @@ python3Packages.buildPythonApplication rec {
|
||||
--replace "(share_dir" "(\"share\""
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace $out/share/applications/electron-cash.desktop \
|
||||
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
|
||||
'';
|
||||
|
||||
# If secp256k1 wasn't added to the library path, the following warning is given:
|
||||
#
|
||||
# Electron Cash was unable to find the secp256k1 library on this system.
|
||||
|
@ -236,7 +236,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Fix the desktop link
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace-fail "/opt/${dir}/${pname}" $out/bin/${pname} \
|
||||
--replace-fail "/opt/${dir}/${pname}" ${meta.mainProgram} \
|
||||
--replace-fail "StartupWMClass=Signal" "StartupWMClass=signal"
|
||||
|
||||
# Note: The following path contains bundled libraries:
|
||||
|
@ -120,11 +120,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
-e "/gtk-update-icon-cache/d"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/share/applications/org.entangle_photo.Manager.desktop" \
|
||||
--replace "Exec=entangle" "Exec=$out/bin/entangle"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Tethered camera control and capture";
|
||||
longDescription = ''
|
||||
|
@ -31,8 +31,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
cp -r usr/share/icons $out/share/icons
|
||||
substitute usr/share/applications/gamepad-tool-debian.desktop \
|
||||
$out/share/applications/gamepad-tool.desktop \
|
||||
--replace "Exec=gamepad-tool" "Exec=$out/bin/gamepad-tool" \
|
||||
--replace "/usr/share/icons/hicolor/256x256/apps/gamepad-tool.png" "$out/share/icons/hicolor/256x256/apps/gamepad-tool.png"
|
||||
--replace-fail "/usr/share/icons/hicolor/256x256/apps/gamepad-tool.png" "gamepad-tool"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
@ -200,9 +200,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# WM keyboard shortcuts
|
||||
--prefix XDG_DATA_DIRS : "${mutter}/share"
|
||||
)
|
||||
for i in $out/share/applications/*; do
|
||||
substituteInPlace $i --replace "Exec=gnome-control-center" "Exec=$out/bin/gnome-control-center"
|
||||
done
|
||||
'';
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
@ -68,16 +68,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libsoup_3
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# The .service file isn't wrapped with the correct environment
|
||||
# so misses GIR files when started. By re-pointing from the gjs
|
||||
# entry point to the wrapped binary we get back to a wrapped
|
||||
# binary.
|
||||
substituteInPlace "data/org.gnome.Maps.service.in" \
|
||||
--replace-fail "Exec=@pkgdatadir@/@app-id@" \
|
||||
"Exec=$out/bin/gnome-maps"
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# “time.js” included by “timeTest” and “translationsTest” depends on “org.gnome.desktop.interface” schema.
|
||||
export XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:$XDG_DATA_DIRS"
|
||||
|
@ -45,16 +45,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./modulesdir-env-var.patch
|
||||
];
|
||||
|
||||
# make .desktop Exec absolute
|
||||
postPatch = ''
|
||||
patch -p0 <<END_PATCH
|
||||
+++ gnome-panel/gnome-panel.desktop.in
|
||||
@@ -7 +7 @@
|
||||
-Exec=gnome-panel
|
||||
+Exec=$out/bin/gnome-panel
|
||||
END_PATCH
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix XDG_DATA_DIRS : "${gnome-menus}/share"
|
||||
|
@ -54,9 +54,8 @@ stdenv.mkDerivation {
|
||||
|
||||
rm $out/share/applications/gnome-panel.desktop
|
||||
|
||||
substitute ${gnome-panel}/share/applications/gnome-panel.desktop \
|
||||
$out/share/applications/gnome-panel.desktop --replace \
|
||||
"Exec=${gnome-panel}/bin/gnome-panel" "Exec=$out/bin/gnome-panel"
|
||||
ln -s ${gnome-panel}/share/applications/gnome-panel.desktop \
|
||||
$out/share/applications/gnome-panel.desktop
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
@ -55,8 +55,7 @@ stdenv.mkDerivation rec {
|
||||
# entry point to the wrapped binary we get back to a wrapped
|
||||
# binary.
|
||||
substituteInPlace "data/org.gnome.Weather.service.in" \
|
||||
--replace "Exec=@DATA_DIR@/@APP_ID@" \
|
||||
"Exec=$out/bin/gnome-weather"
|
||||
--replace-fail "Exec=@DATA_DIR@/@APP_ID@" "Exec=gnome-weather"
|
||||
|
||||
chmod +x meson_post_install.py
|
||||
patchShebangs meson_post_install.py
|
||||
|
@ -62,8 +62,6 @@ in stdenv.mkDerivation rec {
|
||||
--add-flags "-jar $out/share/java/ij.jar -ijpath $out/share"
|
||||
|
||||
install -Dm644 ${icon} $out/share/icons/hicolor/128x128/apps/imagej.png
|
||||
substituteInPlace $out/share/applications/ImageJ.desktop \
|
||||
--replace Exec=imagej Exec=$out/bin/imagej
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -101,8 +101,6 @@ stdenv.mkDerivation rec {
|
||||
++ builtins.map (b: backends."${b}") withBackends;
|
||||
|
||||
postInstall = ''
|
||||
# fix the executable path and install the desktop item
|
||||
substituteInPlace ../files/imv.desktop --replace "imv %F" "$out/bin/imv %F"
|
||||
install -Dm644 ../files/imv.desktop $out/share/applications/
|
||||
'';
|
||||
|
||||
@ -111,8 +109,8 @@ stdenv.mkDerivation rec {
|
||||
# so we have to fix those to the binaries we installed into the /nix/store
|
||||
|
||||
substituteInPlace "$out/bin/imv" \
|
||||
--replace "imv-wayland" "$out/bin/imv-wayland" \
|
||||
--replace "imv-x11" "$out/bin/imv-x11"
|
||||
--replace-fail "imv-wayland" "$out/bin/imv-wayland" \
|
||||
--replace-fail "imv-x11" "$out/bin/imv-x11"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
@ -52,9 +52,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
for f in $out/share/applications/* ; do
|
||||
substituteInPlace $f \
|
||||
--replace Qt4 Qt5 \
|
||||
--replace Exec=nmapsi4 Exec=$out/bin/nmapsi4 \
|
||||
--replace "Exec=kdesu nmapsi4" "Exec=kdesu $out/bin/nmapsi4"
|
||||
--replace Qt4 Qt5
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -98,9 +98,6 @@ buildDotnetModule rec {
|
||||
install -D ./mime/Ryujinx.xml $out/share/mime/packages/Ryujinx.xml
|
||||
install -D ../misc/Logo.svg $out/share/icons/hicolor/scalable/apps/Ryujinx.svg
|
||||
|
||||
substituteInPlace $out/share/applications/Ryujinx.desktop \
|
||||
--replace "Ryujinx.sh %f" "$out/bin/Ryujinx.sh %f"
|
||||
|
||||
ln -s $out/bin/Ryujinx $out/bin/ryujinx
|
||||
|
||||
popd
|
||||
|
@ -61,11 +61,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
patchShebangs meson_post_install.py
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
substituteInPlace $out/share/applications/com.gexperts.Tilix.desktop \
|
||||
--replace "Exec=tilix" "Exec=$out/bin/tilix"
|
||||
'';
|
||||
|
||||
passthru.tests.test = nixosTests.terminal-emulators.tilix;
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -86,11 +86,6 @@ stdenv.mkDerivation rec {
|
||||
"--set-default PERFPROFILER_PARSER_FILEPATH ${lib.getBin perf}/bin"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/share/applications/org.qt-project.qtcreator.desktop \
|
||||
--replace "Exec=qtcreator" "Exec=$out/bin/qtcreator"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross-platform IDE tailored to the needs of Qt developers";
|
||||
longDescription = ''
|
||||
|
@ -38,7 +38,6 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace snap/gui/fclones-gui.desktop \
|
||||
--replace Exec=fclones-gui Exec=$out/bin/fclones-gui \
|
||||
--replace 'Icon=''${SNAP}/meta/gui/fclones-gui.png' Icon=fclones-gui
|
||||
|
||||
install -Dm444 snap/gui/fclones-gui.desktop -t $out/share/applications
|
||||
|
Loading…
Reference in New Issue
Block a user