Merge pull request #250182 from hacker1024/feature/youtube-music-wayland
youtube-music: Respect NIXOS_OZONE_WL
This commit is contained in:
commit
cc9110350d
1 changed files with 8 additions and 3 deletions
|
@ -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 ];
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue