From 28de4ac62a9839145f3564ce0f24c15301a010c9 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sat, 17 Apr 2021 12:38:37 +0200 Subject: [PATCH] treewide: make AppRun substitutions constistent --- pkgs/applications/audio/apple-music-electron/default.nix | 2 +- pkgs/applications/audio/nuclear/default.nix | 2 +- pkgs/applications/audio/plexamp/default.nix | 2 +- pkgs/applications/blockchains/crypto-org-wallet.nix | 2 +- pkgs/applications/blockchains/trezor-suite/default.nix | 3 ++- pkgs/applications/graphics/runwayml/default.nix | 3 ++- pkgs/applications/misc/zettlr/default.nix | 3 ++- pkgs/applications/networking/pcloud/default.nix | 4 ++-- pkgs/applications/office/timeular/default.nix | 3 ++- pkgs/applications/video/lbry/default.nix | 2 +- pkgs/tools/misc/betterdiscord-installer/default.nix | 2 +- 11 files changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/audio/apple-music-electron/default.nix b/pkgs/applications/audio/apple-music-electron/default.nix index e4d43d7f01f..850f644afc3 100644 --- a/pkgs/applications/audio/apple-music-electron/default.nix +++ b/pkgs/applications/audio/apple-music-electron/default.nix @@ -18,7 +18,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications substituteInPlace $out/share/applications/${pname}.desktop \ - --replace "Exec=AppRun" "Exec=$out/bin/apple-music-electron" + --replace 'Exec=AppRun' 'Exec=${pname}' cp -r ${appimageContents}/usr/share/icons $out/share ''; diff --git a/pkgs/applications/audio/nuclear/default.nix b/pkgs/applications/audio/nuclear/default.nix index 6b2a5b67122..e107f44cf6f 100644 --- a/pkgs/applications/audio/nuclear/default.nix +++ b/pkgs/applications/audio/nuclear/default.nix @@ -18,7 +18,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications substituteInPlace $out/share/applications/${pname}.desktop \ - --replace 'Exec=AppRun' 'Exec=$out/bin/nuclear' + --replace 'Exec=AppRun' 'Exec=${pname}' cp -r ${appimageContents}/usr/share/icons $out/share ''; diff --git a/pkgs/applications/audio/plexamp/default.nix b/pkgs/applications/audio/plexamp/default.nix index cb682f91b6d..47b74cc865b 100644 --- a/pkgs/applications/audio/plexamp/default.nix +++ b/pkgs/applications/audio/plexamp/default.nix @@ -25,7 +25,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop install -m 444 -D ${appimageContents}/plexamp.png \ $out/share/icons/hicolor/512x512/apps/plexamp.png - substituteInPlace $out/share/applications/plexamp.desktop \ + substituteInPlace $out/share/applications/${pname}.desktop \ --replace 'Exec=AppRun' 'Exec=${pname}' ''; diff --git a/pkgs/applications/blockchains/crypto-org-wallet.nix b/pkgs/applications/blockchains/crypto-org-wallet.nix index be45967018d..7b0a895f4a1 100644 --- a/pkgs/applications/blockchains/crypto-org-wallet.nix +++ b/pkgs/applications/blockchains/crypto-org-wallet.nix @@ -20,7 +20,7 @@ in appimageTools.wrapType2 rec { ${imagemagick}/bin/convert ${appimageContents}/${pname}.png -resize 512x512 ${pname}_512.png install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png substituteInPlace $out/share/applications/${pname}.desktop \ - --replace 'Exec=AppRun --no-sandbox %U' "Exec=$out/bin/${pname}" + --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U' ''; meta = with lib; { diff --git a/pkgs/applications/blockchains/trezor-suite/default.nix b/pkgs/applications/blockchains/trezor-suite/default.nix index 098a948c845..68b83aff88d 100644 --- a/pkgs/applications/blockchains/trezor-suite/default.nix +++ b/pkgs/applications/blockchains/trezor-suite/default.nix @@ -35,7 +35,8 @@ appimageTools.wrapType2 rec { install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png install -m 444 -D ${appimageContents}/resources/images/icons/512x512.png $out/share/icons/hicolor/512x512/apps/${pname}.png - substituteInPlace $out/share/applications/trezor-suite.desktop --replace 'Exec=AppRun' 'Exec=${pname}' + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' # symlink system binaries instead bundled ones mkdir -p $out/share/${pname}/resources/bin/{bridge,tor} diff --git a/pkgs/applications/graphics/runwayml/default.nix b/pkgs/applications/graphics/runwayml/default.nix index 9366276ebf8..0b656a8d5dd 100644 --- a/pkgs/applications/graphics/runwayml/default.nix +++ b/pkgs/applications/graphics/runwayml/default.nix @@ -31,7 +31,8 @@ in postBuild = '' mkdir -p $out/share/pixmaps/ $out/share/applications cp ${appimage-contents}/usr/share/icons/hicolor/1024x1024/apps/runway.png $out/share/pixmaps/runway.png - sed 's:Exec=AppRun:Exec=runwayml:' ${appimage-contents}/runway.desktop > $out/share/applications/runway.desktop + substituteInPlace ${appimage-contents}/runway.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' ''; meta = with lib; { diff --git a/pkgs/applications/misc/zettlr/default.nix b/pkgs/applications/misc/zettlr/default.nix index eb8c81dae7e..3d7f5629123 100644 --- a/pkgs/applications/misc/zettlr/default.nix +++ b/pkgs/applications/misc/zettlr/default.nix @@ -33,7 +33,8 @@ appimageTools.wrapType2 rec { mv $out/bin/{${name},${pname}} install -m 444 -D ${appimageContents}/Zettlr.desktop $out/share/applications/zettlr.desktop install -m 444 -D ${appimageContents}/Zettlr.png $out/share/icons/hicolor/512x512/apps/zettlr.png - substituteInPlace $out/share/applications/zettlr.desktop --replace 'Exec=AppRun' 'Exec=${pname}' + substituteInPlace $out/share/applications/zettlr.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' ''; meta = with lib; { diff --git a/pkgs/applications/networking/pcloud/default.nix b/pkgs/applications/networking/pcloud/default.nix index 312734dba14..64721cd75a6 100644 --- a/pkgs/applications/networking/pcloud/default.nix +++ b/pkgs/applications/networking/pcloud/default.nix @@ -84,8 +84,8 @@ in stdenv.mkDerivation { substitute \ app/pcloud.desktop \ share/applications/pcloud.desktop \ - --replace "Name=pcloud" "Name=pCloud" \ - --replace "Exec=AppRun" "Exec=$out/bin/pcloud" + --replace 'Name=pcloud' 'Name=pCloud' \ + --replace 'Exec=AppRun' 'Exec=${pname}' # Build the main executable cat > bin/pcloud <