pythonPAckages.pyspotify: refactor move to python-modules
This commit is contained in:
parent
d241cc3a65
commit
2cb75f82fc
2 changed files with 45 additions and 37 deletions
44
pkgs/development/python-modules/pyspotify/default.nix
Normal file
44
pkgs/development/python-modules/pyspotify/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchurl
|
||||
, cffi
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyspotify";
|
||||
version = "2.0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mopidy/pyspotify/archive/v${version}.tar.gz";
|
||||
sha256 = "1ilbz2w1gw3f1bpapfa09p84dwh08bf7qcrkmd3aj0psz57p2rls";
|
||||
};
|
||||
|
||||
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 rickynils ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
}
|
|
@ -4308,43 +4308,7 @@ in {
|
|||
|
||||
graphitepager = callPackage ../development/python-modules/graphitepager { };
|
||||
|
||||
pyspotify = buildPythonPackage rec {
|
||||
name = "pyspotify-${version}";
|
||||
|
||||
version = "2.0.5";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/mopidy/pyspotify/archive/v${version}.tar.gz";
|
||||
sha256 = "1ilbz2w1gw3f1bpapfa09p84dwh08bf7qcrkmd3aj0psz57p2rls";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ 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 = {
|
||||
homepage = http://pyspotify.mopidy.com;
|
||||
description = "A Python interface to Spotify’s online music streaming service";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ lovek323 rickynils ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
pyspotify = callPackage ../development/python-modules/pyspotify { };
|
||||
|
||||
pykka = buildPythonPackage rec {
|
||||
name = "pykka-${version}";
|
||||
|
|
Loading…
Reference in a new issue