pyspotify: fix build on darwin

* use install_name_tool to have _spotify.so point to the correct library
This commit is contained in:
Jason "Don" O'Conal 2013-07-04 19:14:32 +10:00
parent 2da7f32b25
commit 0f4f212adc

View File

@ -6197,14 +6197,24 @@ pythonPackages = python.modules // rec {
preConfigure = '' preConfigure = ''
find -print0 | xargs -0 touch find -print0 | xargs -0 touch
''; '';
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
find "$out" -name _spotify.so -exec \
install_name_tool -change \
@loader_path/../Frameworks/libspotify.framework/libspotify \
${pkgs.libspotify}/lib/libspotify.dylib \
{} \;
'';
# There are no tests # There are no tests
doCheck = false; doCheck = false;
meta = { meta = with stdenv.lib; {
homepage = http://pyspotify.mopidy.com; homepage = http://pyspotify.mopidy.com;
description = "A Python interface to Spotifys online music streaming service"; description = "A Python interface to Spotifys online music streaming service";
maintainers = [ stdenv.lib.maintainers.rickynils ]; license = licenses.unfree;
maintainers = with maintainers; [ lovek323 rickynils ];
platforms = platforms.unix;
}; };
}; };