From 0f4f212adc498f57c5ff1f952fb93822efa48582 Mon Sep 17 00:00:00 2001 From: "Jason \"Don\" O'Conal" Date: Thu, 4 Jul 2013 19:14:32 +1000 Subject: [PATCH] pyspotify: fix build on darwin * use install_name_tool to have _spotify.so point to the correct library --- pkgs/top-level/python-packages.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9f4a27803015..2e56a26ec882 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6197,14 +6197,24 @@ pythonPackages = python.modules // rec { preConfigure = '' 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 doCheck = false; - meta = { - homepage = http://pyspotify.mopidy.com; + meta = with stdenv.lib; { + homepage = http://pyspotify.mopidy.com; description = "A Python interface to Spotify’s online music streaming service"; - maintainers = [ stdenv.lib.maintainers.rickynils ]; + license = licenses.unfree; + maintainers = with maintainers; [ lovek323 rickynils ]; + platforms = platforms.unix; }; };