spotify: prefer Wayland launcher
This commit is contained in:
@@ -114,6 +114,32 @@
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
spotifyWaylandFlags = [
|
||||||
|
"--enable-features=UseOzonePlatform,WaylandWindowDecorations"
|
||||||
|
"--ozone-platform=wayland"
|
||||||
|
"--enable-wayland-ime=true"
|
||||||
|
];
|
||||||
|
spotifyWaylandWrapperArgs = lib.concatMapStringsSep " " (flag: "--add-flags ${lib.escapeShellArg flag}") spotifyWaylandFlags;
|
||||||
|
spotifyWaylandPatch = lib.hiPrio (pkgs.runCommand "${pkgs.spotify.name}-wayland-patch" {
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgs.gnused
|
||||||
|
pkgs.makeWrapper
|
||||||
|
];
|
||||||
|
} ''
|
||||||
|
mkdir -p "$out/bin" "$out/share/applications"
|
||||||
|
|
||||||
|
makeWrapper ${pkgs.spotify}/bin/spotify "$out/bin/spotify" \
|
||||||
|
--unset NIXOS_OZONE_WL \
|
||||||
|
${spotifyWaylandWrapperArgs}
|
||||||
|
|
||||||
|
cp ${pkgs.spotify}/share/applications/spotify.desktop "$out/share/applications/spotify.desktop"
|
||||||
|
chmod u+w "$out/share/applications/spotify.desktop"
|
||||||
|
|
||||||
|
${pkgs.gnused}/bin/sed -i \
|
||||||
|
-e "s#^TryExec=.*spotify\$#TryExec=$out/bin/spotify#" \
|
||||||
|
-e "s#^Exec=.*spotify\\( .*\\)\\?\$#Exec=$out/bin/spotify\\1#" \
|
||||||
|
"$out/share/applications/spotify.desktop"
|
||||||
|
'');
|
||||||
rlruPackages = inputs.rlru.packages.${pkgs.stdenv.hostPlatform.system};
|
rlruPackages = inputs.rlru.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
rlruDioxusDesktopBase = rlruPackages.rlru-dioxus-desktop;
|
rlruDioxusDesktopBase = rlruPackages.rlru-dioxus-desktop;
|
||||||
rlruDioxusDesktop = pkgs.symlinkJoin {
|
rlruDioxusDesktop = pkgs.symlinkJoin {
|
||||||
@@ -317,6 +343,7 @@
|
|||||||
slack
|
slack
|
||||||
spicetify-cli
|
spicetify-cli
|
||||||
spotify
|
spotify
|
||||||
|
spotifyWaylandPatch
|
||||||
tor-browser
|
tor-browser
|
||||||
# vscode
|
# vscode
|
||||||
zulip
|
zulip
|
||||||
|
|||||||
Reference in New Issue
Block a user