diff --git a/pkgs/applications/audio/youtube-music/default.nix b/pkgs/applications/audio/youtube-music/default.nix index 91cf74e65d0c..d6313c6bd84f 100644 --- a/pkgs/applications/audio/youtube-music/default.nix +++ b/pkgs/applications/audio/youtube-music/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, appimageTools, }: +{ lib, fetchurl, appimageTools, makeWrapper }: let pname = "youtube-music"; @@ -11,13 +11,16 @@ let appimageContents = appimageTools.extract { inherit pname version src; }; in -appimageTools.wrapType2 rec { +(appimageTools.wrapType2 rec { inherit pname version src; extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libappindicator ]; extraInstallCommands = '' mv $out/bin/{${pname}-${version},${pname}} + wrapProgram "$out/bin/${pname}" \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" + install -m 444 \ -D ${appimageContents}/youtube-music.desktop \ -t $out/share/applications @@ -36,4 +39,6 @@ appimageTools.wrapType2 rec { maintainers = [ maintainers.aacebedo ]; mainProgram = "youtube-music"; }; -} +}).overrideAttrs ({ nativeBuildInputs ? [ ], ... }: { + nativeBuildInputs = nativeBuildInputs ++ [ makeWrapper ]; +})