Skip to content

Commit

Permalink
spotify: Add support for NIXOS_OZONE_WL
Browse files Browse the repository at this point in the history
  • Loading branch information
Enzime committed Apr 4, 2023
1 parent 1e36c70 commit b587224
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/applications/audio/spotify/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl, lib, stdenv, squashfsTools, xorg, alsa-lib, makeWrapper, wrapGAppsHook, openssl, freetype
{ fetchurl, lib, stdenv, squashfsTools, xorg, alsa-lib, makeShellWrapper, wrapGAppsHook, openssl, freetype
, glib, pango, cairo, atk, gdk-pixbuf, gtk3, cups, nspr, nss, libpng, libnotify
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curlWithGnuTls, zlib, gnome
, at-spi2-atk, at-spi2-core, libpulseaudio, libdrm, mesa, libxkbcommon
Expand Down Expand Up @@ -86,7 +86,7 @@ stdenv.mkDerivation {
sha512 = "339r2q13nnpwi7gjd1axc6z2gycfm9gwz3x9dnqyaqd1g3rw7nk6nfbp6bmpkr68lfq1jfgvqwnimcgs84rsi7nmgsiabv3cz0673wv";
};

nativeBuildInputs = [ makeWrapper wrapGAppsHook squashfsTools ];
nativeBuildInputs = [ wrapGAppsHook makeShellWrapper squashfsTools ];

dontStrip = true;
dontPatchELF = true;
Expand Down Expand Up @@ -144,13 +144,14 @@ stdenv.mkDerivation {
--set-rpath $rpath $out/share/spotify/spotify
librarypath="${lib.makeLibraryPath deps}:$libdir"
wrapProgram $out/share/spotify/spotify \
wrapProgramShell $out/share/spotify/spotify \
''${gappsWrapperArgs[@]} \
${lib.optionalString (deviceScaleFactor != null) ''
--add-flags "--force-device-scale-factor=${toString deviceScaleFactor}" \
''} \
--prefix LD_LIBRARY_PATH : "$librarypath" \
--prefix PATH : "${gnome.zenity}/bin"
--prefix PATH : "${gnome.zenity}/bin" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
# fix Icon line in the desktop file (#48062)
sed -i "s:^Icon=.*:Icon=spotify-client:" "$out/share/spotify/spotify.desktop"
Expand Down

0 comments on commit b587224

Please sign in to comment.