3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #175369 from dotlambda/libspotify-drop

libspotify: remove
This commit is contained in:
Ben Siraphob 2022-05-30 07:11:27 +00:00 committed by GitHub
commit fd523bfe80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 282 deletions

View file

@ -1,13 +0,0 @@
diff --git a/src/internet/spotify/spotifyservice.cpp b/src/internet/spotify/spotifyservice.cpp
index 88c7383..6e0893c 100644
--- a/src/internet/spotify/spotifyservice.cpp
+++ b/src/internet/spotify/spotifyservice.cpp
@@ -94,7 +94,7 @@ SpotifyService::SpotifyService(Application* app, InternetModel* parent)
system_blob_path_ = QCoreApplication::applicationDirPath() +
"/../PlugIns/clementine-spotifyblob";
#else
- system_blob_path_ = QCoreApplication::applicationDirPath() +
+ system_blob_path_ = qgetenv("CLEMENTINE_SPOTIFYBLOB") +
"/clementine-spotifyblob" CMAKE_EXECUTABLE_SUFFIX;
#endif

View file

@ -23,7 +23,6 @@
, libpulseaudio
, gvfs
, libcdio
, libspotify
, pcre
, projectm
, protobuf
@ -49,7 +48,8 @@ let
withMTP = config.clementine.mtp or true;
withCD = config.clementine.cd or true;
withCloud = config.clementine.cloud or true;
in mkDerivation {
pname = "clementine";
version = "unstable-2022-04-11";
src = fetchFromGitHub {
@ -59,10 +59,6 @@ let
sha256 = "06fcbs3wig3mh711iypyj49qm5246f7qhvgvv8brqfrd8cqyh6qf";
};
patches = [
./clementine-spotify-blob.patch
];
nativeBuildInputs = [
cmake
pkg-config
@ -101,6 +97,8 @@ let
alsa-lib
]
# gst_plugins needed for setup-hooks
++ gst_plugins
++ lib.optionals (withIpod) [ libgpod libplist usbmuxd ]
++ lib.optionals (withMTP) [ libmtp ]
++ lib.optionals (withCD) [ libcdio ]
@ -115,74 +113,25 @@ let
-e 's,libprotobuf.a,protobuf,g'
'';
free = mkDerivation {
pname = "clementine-free";
inherit version;
inherit src patches nativeBuildInputs postPatch;
preConfigure = ''
rm -rf ext/{,lib}clementine-spotifyblob
'';
# gst_plugins needed for setup-hooks
buildInputs = buildInputs ++ gst_plugins;
cmakeFlags = [
"-DUSE_SYSTEM_PROJECTM=ON"
"-DSPOTIFY_BLOB=OFF"
];
preConfigure = ''
rm -rf ext/{,lib}clementine-spotifyblob
'';
postInstall = ''
wrapProgram $out/bin/clementine \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
'';
cmakeFlags = [
"-DUSE_SYSTEM_PROJECTM=ON"
"-DSPOTIFY_BLOB=OFF"
];
passthru.unfree = unfree;
postInstall = ''
wrapProgram $out/bin/clementine \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
'';
meta = with lib; {
homepage = "https://www.clementine-player.org";
description = "A multiplatform music player";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ];
};
meta = with lib; {
homepage = "https://www.clementine-player.org";
description = "A multiplatform music player";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ];
};
# Unfree Spotify blob for Clementine
unfree = mkDerivation {
pname = "clementine-blob";
inherit version;
# Use the same patches and sources as Clementine
inherit src nativeBuildInputs patches postPatch;
buildInputs = buildInputs ++ [ libspotify ];
# Only build and install the Spotify blob
preBuild = ''
cd ext/clementine-spotifyblob
'';
postInstall = ''
mkdir -p $out/libexec/clementine
mv $out/bin/clementine-spotifyblob $out/libexec/clementine
rmdir $out/bin
makeWrapper ${free}/bin/clementine $out/bin/clementine \
--set CLEMENTINE_SPOTIFYBLOB $out/libexec/clementine
mkdir -p $out/share
for dir in applications icons kde4; do
ln -s "${free}/share/$dir" "$out/share/$dir"
done
'';
meta = with lib; {
homepage = "https://www.clementine-player.org";
description = "Spotify integration for Clementine";
# The blob itself is Apache-licensed, although libspotify is unfree.
license = licenses.asl20;
platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ];
};
};
in
free
}

View file

@ -33,10 +33,6 @@ lib.makeScope newScope (self: with self; {
mopidy-soundcloud = callPackage ./soundcloud.nix { };
mopidy-spotify = callPackage ./spotify.nix { };
mopidy-spotify-tunigo = callPackage ./spotify-tunigo.nix { };
mopidy-tunein = callPackage ./tunein.nix { };
mopidy-youtube = callPackage ./youtube.nix { };

View file

@ -1,23 +0,0 @@
{ lib, fetchFromGitHub, pythonPackages, mopidy, mopidy-spotify }:
pythonPackages.buildPythonApplication rec {
pname = "mopidy-spotify-tunigo";
version = "1.0.0";
src = fetchFromGitHub {
owner = "trygveaa";
repo = "mopidy-spotify-tunigo";
rev = "v${version}";
sha256 = "1jwk0b2iz4z09qynnhcr07w15lx6i1ra09s9lp48vslqcf2fp36x";
};
propagatedBuildInputs = [ mopidy mopidy-spotify pythonPackages.tunigo ];
doCheck = false;
meta = with lib; {
description = "Mopidy extension for providing the browse feature of Spotify";
license = licenses.asl20;
maintainers = [ maintainers.spwhitt ];
};
}

View file

@ -1,25 +0,0 @@
{ lib, fetchFromGitHub, pythonPackages, mopidy }:
pythonPackages.buildPythonApplication rec {
pname = "mopidy-spotify";
version = "4.1.1";
src = fetchFromGitHub {
owner = "mopidy";
repo = "mopidy-spotify";
rev = "v${version}";
sha256 = "1qsac2yy26cdlsmxd523v8ayacs0s6jj9x79sngwap781i63zqrm";
};
propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
doCheck = false;
meta = with lib; {
homepage = "https://www.mopidy.com/";
description = "Mopidy extension for playing music from Spotify";
license = licenses.asl20;
maintainers = with maintainers; [ rski ];
hydraPlatforms = [ ];
};
}

View file

@ -1,91 +0,0 @@
{ lib, stdenv, fetchurl, libspotify, alsa-lib, readline, pkg-config, apiKey ? null, unzip, gnused }:
let
version = "12.1.51";
isLinux = (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "i686-linux");
in
if (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "x86_64-darwin" && stdenv.hostPlatform.system != "i686-linux")
then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here"
else stdenv.mkDerivation {
pname = "libspotify";
inherit version;
src =
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-x86_64-release.tar.gz";
sha256 = "0n0h94i4xg46hfba95n3ypah93crwb80bhgsg00f6sms683lx8a3";
}
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip";
sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0";
}
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-i686-release.tar.gz";
sha256 = "1bjmn64gbr4p9irq426yap4ipq9rb84zsyhjjr7frmmw22xb86ll";
}
else
null;
dontBuild = true;
installPhase = if (isLinux)
then "installPhase"
else ''
mkdir -p "$out"/include/libspotify
mv -v libspotify.framework/Versions/Current/Headers/api.h \
"$out"/include/libspotify
mkdir -p "$out"/lib
mv -v libspotify.framework/Versions/Current/libspotify \
"$out"/lib/libspotify.dylib
mkdir -p "$out"/share/man
mv -v man3 "$out"/share/man
'';
# darwin-specific
nativeBuildInputs = lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") unzip;
# linux-specific
installFlags = lib.optional isLinux
"prefix=$(out)";
patchPhase = lib.optionalString isLinux
"${gnused}/bin/sed -i 's/ldconfig//' Makefile";
postInstall = lib.optionalString isLinux
"mv -v share $out";
passthru = {
samples = if apiKey == null
then throw ''
Please visit ${libspotify.meta.homepage} to get an api key then set config.libspotify.apiKey accordingly
'' else stdenv.mkDerivation {
pname = "libspotify-samples";
inherit version;
src = libspotify.src;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libspotify readline ]
++ lib.optional (!stdenv.isDarwin) alsa-lib;
postUnpack = "sourceRoot=$sourceRoot/share/doc/libspotify/examples";
patchPhase = "cp ${apiKey} appkey.c";
installPhase = ''
mkdir -p $out/bin
install -m 755 jukebox/jukebox $out/bin
install -m 755 spshell/spshell $out/bin
install -m 755 localfiles/posix_stu $out/bin
'';
meta = libspotify.meta // { description = "Spotify API library samples"; };
};
inherit apiKey;
};
meta = with lib; {
description = "Spotify API library";
homepage = "https://developer.spotify.com/technologies/libspotify";
maintainers = with maintainers; [ lovek323 ];
license = licenses.unfree;
};
}

View file

@ -1,45 +0,0 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, cffi
, libspotify
}:
buildPythonPackage rec {
pname = "pyspotify";
version = "2.1.3";
src = fetchFromGitHub {
owner = "mopidy";
repo = "pyspotify";
rev = "v${version}";
sha256 = "sha256-CjIRwSlR5HPOJ9tp7lrdcDPiKH3p/PxvEJ8sqVD5s3Q=";
};
propagatedBuildInputs = [ cffi ];
buildInputs = [ libspotify ];
# python zip complains about old timestamps
preConfigure = ''
find -print0 | xargs -0 touch
'';
postInstall = lib.optionalString stdenv.isDarwin ''
find "$out" -name _spotify.so -exec \
install_name_tool -change \
@loader_path/../Frameworks/libspotify.framework/libspotify \
${libspotify}/lib/libspotify.dylib \
{} \;
'';
# There are no tests
doCheck = false;
meta = with lib; {
homepage = "http://pyspotify.mopidy.com";
description = "A Python interface to Spotifys online music streaming service";
license = licenses.unfree;
maintainers = with maintainers; [ lovek323 ];
};
}

View file

@ -193,6 +193,7 @@ mapAliases ({
clawsMail = throw "'clawsMail' has been renamed to/replaced by 'claws-mail'"; # Converted to throw 2022-02-22
cldr-emoji-annotation = throw "'cldr-emoji-annotation' has been removed, as it was unmaintained; use 'cldr-annotations' instead"; # Added 2022-04-03
clearsilver = throw "clearsilver has been removed: abandoned by upstream"; # Added 2022-03-15
clementineUnfree = throw "clementineUnfree has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29
clutter_gtk = throw "'clutter_gtk' has been renamed to/replaced by 'clutter-gtk'"; # Converted to throw 2022-02-22
cmakeWithQt4Gui = throw "cmakeWithQt4Gui has been removed in favor of cmakeWithGui (Qt 5)"; # Added 2021-05
codimd = hedgedoc; # Added 2020-11-29
@ -698,6 +699,7 @@ mapAliases ({
libressl_3_2 = throw "'libressl_3_2' has reached end-of-life "; # Added 2022-03-19
librsync_0_9 = throw "librsync_0_9 has been removed"; # Added 2021-07-24
libseat = seatd; # Added 2021-06-24
libspotify = throw "libspotify has been removed because Spotify stopped supporting it"; # added 2022-05-29
libstdcxxHook = throw "libstdcxx hook has been removed because cc-wrapper is now directly aware of the c++ standard library intended to be used"; # Added 2020-06-22
libsysfs = throw "'libsysfs' has been renamed to/replaced by 'sysfsutils'"; # Converted to throw 2022-02-22
libtidy = throw "'libtidy' has been renamed to/replaced by 'html-tidy'"; # Converted to throw 2022-02-22
@ -842,6 +844,8 @@ mapAliases ({
mopidy-gmusic = throw "mopidy-gmusic has been removed because Google Play Music was discontinued"; # Added 2021-03-07
mopidy-local-images = throw "mopidy-local-images has been removed as it's unmaintained. Its functionality has been merged into the mopidy-local extension"; # Added 2020-10-18
mopidy-local-sqlite = throw "mopidy-local-sqlite has been removed as it's unmaintained. Its functionality has been merged into the mopidy-local extension"; # Added 2020-10-18
mopidy-spotify = throw "mopidy-spotify has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29
mopidy-spotify-tunigo = throw "mopidy-spotify-tunigo has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29
morituri = throw "'morituri' has been renamed to/replaced by 'whipper'"; # Converted to throw 2022-02-22
mozart-binary = mozart2-binary; # Added 2019-09-23

View file

@ -4625,8 +4625,6 @@ with pkgs;
protobuf = protobuf3_19;
};
clementineUnfree = clementine.unfree;
mellowplayer = libsForQt5.callPackage ../applications/audio/mellowplayer { };
ciopfs = callPackage ../tools/filesystems/ciopfs { };
@ -28218,8 +28216,6 @@ with pkgs;
mopidy-scrobbler
mopidy-somafm
mopidy-soundcloud
mopidy-spotify
mopidy-spotify-tunigo
mopidy-subidy
mopidy-tunein
mopidy-youtube
@ -29720,8 +29716,6 @@ with pkgs;
spotify = callPackage ../applications/audio/spotify/wrapper.nix { };
libspotify = callPackage ../development/libraries/libspotify (config.libspotify or {});
sourcetrail = let
llvmPackages = llvmPackages_10;
in libsForQt5.callPackage ../development/tools/sourcetrail {

View file

@ -113,6 +113,7 @@ mapAliases ({
pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
pyreadability = readability-lxml; # added 2022-05-24
pysmart-smartx = pysmart; # added 2021-10-22
pyspotify = throw "pyspotify has been removed because Spotify stopped supporting libspotify"; # added 2022-05-29
pytest_6 = pytest; # added 2022-02-10
pytestcov = pytest-cov; # added 2021-01-04
pytest-pep8 = pytestpep8; # added 2021-01-04

View file

@ -8079,8 +8079,6 @@ in {
pyspnego = callPackage ../development/python-modules/pyspnego { };
pyspotify = callPackage ../development/python-modules/pyspotify { };
pysptk = callPackage ../development/python-modules/pysptk { };
pysqlcipher3 = callPackage ../development/python-modules/pysqlcipher3 {