Merge pull request #261501 from Gerg-L/spotifywm

spotifywm: ensure all files are propagated
This commit is contained in:
éclairevoyant 2024-03-01 22:27:34 +00:00 committed by GitHub
commit 3924605af7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 41 deletions

View File

@ -1,39 +0,0 @@
{ lib, stdenv, fetchFromGitHub, spotify, xorg, makeWrapper }:
stdenv.mkDerivation {
pname = "spotifywm-unstable";
version = "2022-10-26";
src = fetchFromGitHub {
owner = "dasJ";
repo = "spotifywm";
rev = "8624f539549973c124ed18753881045968881745";
sha256 = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ xorg.libX11 ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
install -Dm644 spotifywm.so $out/lib/
ln -sf ${spotify}/bin/spotify $out/bin/spotify
# wrap spotify to use spotifywm.so
wrapProgram $out/bin/spotify --set LD_PRELOAD "$out/lib/spotifywm.so"
# backwards compatibility for people who are using the "spotifywm" binary
ln -sf $out/bin/spotify $out/bin/spotifywm
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/dasJ/spotifywm";
description = "Wrapper around Spotify that correctly sets class name before opening the window";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ jqueiroz the-argus ];
};
}

View File

@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
libX11,
lndir,
makeBinaryWrapper,
spotify,
}:
stdenv.mkDerivation {
pname = "spotifywm";
version = "0-unstable-2022-10-25";
src = fetchFromGitHub {
owner = "dasJ";
repo = "spotifywm";
rev = "8624f539549973c124ed18753881045968881745";
hash = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
};
nativeBuildInputs = [
makeBinaryWrapper
lndir
];
buildInputs = [ libX11 ];
installPhase = ''
runHook preInstall
mkdir -p $out
lndir -silent ${spotify} $out
install -Dm644 spotifywm.so $out/lib/spotifywm.so
wrapProgram $out/bin/spotify \
--suffix LD_PRELOAD : "$out/lib/spotifywm.so"
runHook postInstall
'';
meta = {
homepage = "https://github.com/dasJ/spotifywm";
description = "Wrapper around Spotify that correctly sets class name before opening the window";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ jqueiroz the-argus ];
mainProgram = "spotify";
};
}

View File

@ -35167,8 +35167,6 @@ with pkgs;
spotify-player = callPackage ../applications/audio/spotify-player { };
spotifywm = callPackage ../applications/audio/spotifywm { };
psst = callPackage ../applications/audio/psst { };
squeezelite = darwin.apple_sdk_11_0.callPackage ../applications/audio/squeezelite {