This commit is contained in:
parent
5f644d0ccd
commit
a394b9cefd
167 changed files with 2795 additions and 2122 deletions
|
@ -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
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue