forked from mirrors/nixpkgs
dadc7eb329
Whenever we create scripts that are installed to $out, we must use runtimeShell in order to get the shell that can be executed on the machine we create the package for. This is relevant for cross-compiling. The only use case for stdenv.shell are scripts that are executed as part of the build system. Usages in checkPhase are borderline however to decrease the likelyhood of people copying the wrong examples, I decided to use runtimeShell as well.
32 lines
985 B
Nix
32 lines
985 B
Nix
{ stdenv, fetchFromGitHub, spotify, xorg, runtimeShell }:
|
|
stdenv.mkDerivation rec {
|
|
name = "spotifywm-unstable-${version}";
|
|
version = "2016-11-28";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dasJ";
|
|
repo = "spotifywm";
|
|
rev = "91dd5532ffb7a398d775abe94fe7781904ab406f";
|
|
sha256 = "01z088i83410bpx1vbp7c6cq01r431v55l7340x3izp53lnpp379";
|
|
};
|
|
|
|
buildInputs = [ xorg.libX11 ];
|
|
|
|
propagatedBuildInputs = [ spotify ];
|
|
|
|
installPhase = ''
|
|
echo "#!${runtimeShell}" > spotifywm
|
|
echo "LD_PRELOAD="$out/lib/spotifywm.so" ${spotify}/bin/spotify \$*" >> spotifywm
|
|
install -Dm644 spotifywm.so $out/lib/spotifywm.so
|
|
install -Dm755 spotifywm $out/bin/spotifywm
|
|
'';
|
|
|
|
meta = with stdenv.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 ];
|
|
};
|
|
}
|