mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
spotify: unbreak it
Spotify doesn't start: $ ./result/bin/spotify /nix/store/yx05s6irqil8a24ilyvjvhnjljmm8f15-spotify-0.9.4.183/bin/.spotify-wrapped: error while loading shared libraries: libcef.so: cannot open shared object file: No such file or directory That is fixed with adding $out/spotify-client/Data to RPATH. Then Spotify errors out trying to open libudev.so.0. We don't have that in nixpkgs, so I'm making a symlink to libudev.so.1 instead. Tested on NixOS x86_64-linux.
This commit is contained in:
parent
6eba129774
commit
d4e469d307
@ -1,4 +1,6 @@
|
||||
{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl, freetype, glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf, libgcrypt, chromium, sqlite, gst_plugins_base, gstreamer }:
|
||||
{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl, freetype
|
||||
, glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf
|
||||
, libgcrypt, chromium, sqlite, gst_plugins_base, gstreamer, udev }:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
@ -57,12 +59,15 @@ stdenv.mkDerivation {
|
||||
ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
|
||||
ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
|
||||
|
||||
# Work around Spotify trying to open libudev.so.0 (which we don't have)
|
||||
ln -s ${udev}/lib/libudev.so.1 $out/lib/libudev.so.0
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
ln -s $out/spotify-client/spotify $out/bin/spotify
|
||||
patchelf \
|
||||
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-rpath $out/lib:$out/spotify-client:${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver xlibs.libX11 qt4 alsaLib stdenv.gcc.gcc freetype glib pango cairo atk gdk_pixbuf gtk GConf cups sqlite]}:${stdenv.gcc.gcc}/lib64 \
|
||||
--set-rpath $out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver xlibs.libX11 qt4 alsaLib stdenv.gcc.gcc freetype glib pango cairo atk gdk_pixbuf gtk GConf cups sqlite]}:${stdenv.gcc.gcc}/lib64 \
|
||||
$out/spotify-client/spotify
|
||||
|
||||
dpkg-deb -x ${qt4webkit} ./
|
||||
|
Loading…
Reference in New Issue
Block a user