Reformat everything
All checks were successful
/ test (push) Successful in 32s

This commit is contained in:
Andrea Ciceri 2024-09-20 11:37:17 +02:00
parent 5f644d0ccd
commit a394b9cefd
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
167 changed files with 2795 additions and 2122 deletions

View file

@ -4,7 +4,8 @@
fetchFromGitHub,
zip,
unzip,
}: let
}:
let
spotify-adblock = rustPlatform.buildRustPackage {
pname = "spotify-adblock";
version = "1.0.3";
@ -33,21 +34,22 @@
'';
};
in
spotify.overrideAttrs (
old: {
buildInputs = (old.buildInputs or []) ++ [zip unzip];
postInstall =
(old.postInstall or "")
+ ''
ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir
sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop"
wrapProgram $out/bin/spotify \
--set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so"
spotify.overrideAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ [
zip
unzip
];
postInstall =
(old.postInstall or "")
+ ''
ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir
sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop"
wrapProgram $out/bin/spotify \
--set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so"
# Hide placeholder for advert banner
${unzip}/bin/unzip -p $out/share/spotify/Apps/xpui.spa xpui.js | sed 's/adsEnabled:\!0/adsEnabled:false/' > $out/share/spotify/Apps/xpui.js
${zip}/bin/zip --junk-paths --update $out/share/spotify/Apps/xpui.spa $out/share/spotify/Apps/xpui.js
rm $out/share/spotify/Apps/xpui.js
'';
}
)
# Hide placeholder for advert banner
${unzip}/bin/unzip -p $out/share/spotify/Apps/xpui.spa xpui.js | sed 's/adsEnabled:\!0/adsEnabled:false/' > $out/share/spotify/Apps/xpui.js
${zip}/bin/zip --junk-paths --update $out/share/spotify/Apps/xpui.spa $out/share/spotify/Apps/xpui.js
rm $out/share/spotify/Apps/xpui.js
'';
})