depot/third_party/nixpkgs/pkgs/development/python-modules/pyspotify/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

44 lines
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ 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 Spotifys online music streaming service";
license = licenses.unfree;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;
};
}