pkg: Enable wayland for spotify

This commit is contained in:
ulic-youthlic 2025-07-13 06:04:55 +08:00
parent dd700c0c4c
commit c48460eb3a
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

@ -3,31 +3,33 @@
unzip, unzip,
zip, zip,
perl, perl,
symlinkJoin, makeWrapper,
srcs, srcs,
}: }:
let let
inherit (srcs) spotx; inherit (srcs) spotx;
spotifyx = spotify.overrideAttrs (
_final: prev: {
nativeBuildInputs = prev.nativeBuildInputs ++ [
unzip
zip
perl
];
spotx = spotx.src;
postUnpack = ''
cp $spotx/spotx.sh ./spotx.sh
chmod +x ./spotx.sh
patchShebangs --build ./spotx.sh
'';
postInstall = ''
./spotx.sh -P $out/share/spotify -h
'';
}
);
in in
symlinkJoin { spotify.overrideAttrs (
name = "spotifyx"; _final: prev: {
paths = [ spotifyx ]; nativeBuildInputs = prev.nativeBuildInputs ++ [
} unzip
zip
perl
makeWrapper
];
spotx = spotx.src;
postUnpack = ''
cp $spotx/spotx.sh ./spotx.sh
chmod +x ./spotx.sh
patchShebangs --build ./spotx.sh
'';
postInstall = ''
./spotx.sh -P $out/share/spotify -h -p
'';
postFixup = ''
wrapProgram $out/bin/spotify \
--set NIXOS_OZONE_WL 1 \
--add-flags '--wayland-text-input-version=3'
'';
}
)