nixpkgs/pkgs/applications/audio/spotifywm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, spotify, xorg, makeWrapper }:
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
pname = "spotifywm-unstable";
2022-11-12 06:14:05 +00:00
version = "2022-10-26";
2018-08-28 00:25:10 +00:00
src = fetchFromGitHub {
2022-11-12 06:14:05 +00:00
owner = "dasJ";
repo = "spotifywm";
rev = "8624f539549973c124ed18753881045968881745";
sha256 = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
2018-08-28 00:25:10 +00:00
};
nativeBuildInputs = [ makeWrapper ];
2018-08-28 00:25:10 +00:00
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
2018-08-28 00:25:10 +00:00
'';
meta = with lib; {
homepage = "https://github.com/dasJ/spotifywm";
2018-08-28 00:25:10 +00:00
description = "Wrapper around Spotify that correctly sets class name before opening the window";
license = licenses.mit;
platforms = platforms.linux;
2023-03-21 12:37:49 +00:00
maintainers = with maintainers; [ jqueiroz the-argus ];
2018-08-28 00:25:10 +00:00
};
}