diff --git a/hmModules/spotify/default.nix b/hmModules/spotify/default.nix index f75af05..af6aa72 100644 --- a/hmModules/spotify/default.nix +++ b/hmModules/spotify/default.nix @@ -13,7 +13,22 @@ }; spotify-adblocked = pkgs.callPackage ./spotify-adblocked.nix { - inherit spotify-adblock; + inherit spotify-adblock spotifywm; + }; + + spotifywm = pkgs.stdenv.mkDerivation { + name = "spotifywm"; + src = pkgs.fetchFromGitHub { + owner = "dasj"; + repo = "spotifywm"; + rev = "8624f539549973c124ed18753881045968881745"; + sha256 = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0="; + }; + buildInputs = [pkgs.xorg.libX11]; + installPhase = '' + mkdir -p $out/lib + cp spotifywm.so $out/lib/ + ''; }; in { home.packages = [spotify-adblocked]; diff --git a/hmModules/spotify/spotify-adblocked.nix b/hmModules/spotify/spotify-adblocked.nix index acd0d6b..628f389 100644 --- a/hmModules/spotify/spotify-adblocked.nix +++ b/hmModules/spotify/spotify-adblocked.nix @@ -39,6 +39,7 @@ # not added if `null`, otherwise, should be a number. deviceScaleFactor ? null, spotify-adblock, + spotifywm, }: let # TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update) # "rev" decides what is actually being downloaded @@ -181,6 +182,7 @@ in --add-flags "--force-device-scale-factor=${toString deviceScaleFactor}" \ ''} \ --prefix LD_LIBRARY_PATH : "$librarypath" \ + --prefix LD_PRELOAD : "${spotifywm}/lib/spotifywm.so" \ --prefix PATH : "${gnome.zenity}/bin" # fix Icon line in the desktop file (#48062)