aws-lc: 1.39.0 -> 1.42.0 (#369942)
[NixPkgs.git] / pkgs / by-name / sp / spotifywm / package.nix
blobeb15fdc1da686219442f503f5dc87d65535027c9
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   libX11,
6   lndir,
7   makeBinaryWrapper,
8   spotify,
9 }:
10 stdenv.mkDerivation {
11   pname = "spotifywm";
12   version = "0-unstable-2022-10-25";
14   src = fetchFromGitHub {
15     owner = "dasJ";
16     repo = "spotifywm";
17     rev = "8624f539549973c124ed18753881045968881745";
18     hash = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
19   };
21   nativeBuildInputs = [
22     makeBinaryWrapper
23     lndir
24   ];
26   buildInputs = [ libX11 ];
28   installPhase = ''
29     runHook preInstall
31     mkdir -p $out
33     lndir -silent ${spotify} $out
35     install -Dm644 spotifywm.so $out/lib/spotifywm.so
37     wrapProgram $out/bin/spotify \
38       --suffix LD_PRELOAD : "$out/lib/spotifywm.so"
40     runHook postInstall
41   '';
43   meta = {
44     homepage = "https://github.com/dasJ/spotifywm";
45     description = "Wrapper around Spotify that correctly sets class name before opening the window";
46     license = lib.licenses.mit;
47     platforms = lib.platforms.linux;
48     maintainers = with lib.maintainers; [
49       jqueiroz
50       the-argus
51     ];
52     mainProgram = "spotify";
53   };