libspotify: remove

As of May 16, 2022, Spotify no longer supports libspotify.
https://developer.spotify.com/community/news/2022/04/12/libspotify-sunset/
This commit is contained in:
Robert Schütz 2022-05-29 22:15:15 +00:00
parent 70c42db535
commit 1f402eec78
3 changed files with 2 additions and 93 deletions

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

@ -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

View file

@ -29714,8 +29714,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 {