2018-10-29 15:50:28 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, buildPythonPackage
|
|
|
|
|
, fetchurl
|
|
|
|
|
, cffi
|
|
|
|
|
, pkgs
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "pyspotify";
|
2020-01-28 00:20:38 +00:00
|
|
|
|
version = "2.1.3";
|
2018-10-29 15:50:28 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
|
url = "https://github.com/mopidy/pyspotify/archive/v${version}.tar.gz";
|
2020-01-28 00:20:38 +00:00
|
|
|
|
sha256 = "1y1zqkqi9jz5m9bb2z7wmax7g40c1snm3c6di6b63726qrf26rb7";
|
2018-10-29 15:50:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
buildInputs = [ pkgs.libspotify ];
|
|
|
|
|
|
|
|
|
|
# python zip complains about old timestamps
|
|
|
|
|
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 = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "http://pyspotify.mopidy.com";
|
2018-10-29 15:50:28 +00:00
|
|
|
|
description = "A Python interface to Spotify’s online music streaming service";
|
|
|
|
|
license = licenses.unfree;
|
2019-08-20 14:24:01 +01:00
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2018-10-29 15:50:28 +00:00
|
|
|
|
platforms = platforms.unix;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|