blob: d6d0a6007f6612806dfa21f51d0838fd7ed575d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{ stdenv
, buildPythonPackage
, fetchurl
, cffi
, pkgs
}:
buildPythonPackage rec {
pname = "pyspotify";
version = "2.1.3";
src = fetchurl {
url = "https://github.com/mopidy/pyspotify/archive/v${version}.tar.gz";
sha256 = "1y1zqkqi9jz5m9bb2z7wmax7g40c1snm3c6di6b63726qrf26rb7";
};
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; {
homepage = "http://pyspotify.mopidy.com";
description = "A Python interface to Spotify’s online music streaming service";
license = licenses.unfree;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;
};
}
|