Unverified Commit 9a5995e2 authored by a-n-n-a-l-e-e's avatar a-n-n-a-l-e-e Committed by GitHub
Browse files

Merge pull request #295265 from jwijenbergh/remove-spotify-tui

spotify-tui: remove
parents 033ae016 71b1855a
Loading
Loading
Loading
Loading
+0 −41
Original line number Diff line number Diff line
From 408e6a5170bbe9f854bf46e1cbae21265cf25294 Mon Sep 17 00:00:00 2001
From: Florian Bruhin <me@the-compiler.org>
Date: Mon, 25 Apr 2022 18:39:07 +0200
Subject: [PATCH] Add Collection SearchType

Backport of https://github.com/ramsayleung/rspotify/pull/306
---
 src/senum.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/senum.rs b/src/senum.rs
index c94c31c..79d8730 100644
--- a/src/senum.rs
+++ b/src/senum.rs
@@ -87,6 +87,7 @@ pub enum Type {
     User,
     Show,
     Episode,
+    Collection,
 }
 impl Type {
     pub fn as_str(&self) -> &str {
@@ -98,6 +99,7 @@ pub fn as_str(&self) -> &str {
             Type::User => "user",
             Type::Show => "show",
             Type::Episode => "episode",
+            Type::Collection => "collection",
         }
     }
 }
@@ -112,6 +114,7 @@ fn from_str(s: &str) -> Result<Self, Self::Err> {
             "user" => Ok(Type::User),
             "show" => Ok(Type::Show),
             "episode" => Ok(Type::Episode),
+            "collection" => Ok(Type::Collection),
             _ => Err(Error::new(ErrorKind::NoEnum(s.to_owned()))),
         }
     }
-- 
2.35.3
+0 −2704

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −59
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, installShellFiles
, pkg-config
, openssl
, python3
, libxcb
, AppKit
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "spotify-tui";
  version = "0.25.0";

  src = fetchFromGitHub {
    owner = "Rigellute";
    repo = "spotify-tui";
    rev = "v${version}";
    hash = "sha256-L5gg6tjQuYoAC89XfKE38KCFONwSAwfNoFEUPH4jNAI=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config python3 ];
  buildInputs = [ ]
    ++ lib.optionals stdenv.isLinux [ openssl libxcb ]
    ++ lib.optionals stdenv.isDarwin [ AppKit Security ];

  postPatch = ''
    # update Cargo.lock to fix build
    ln -sf ${./Cargo.lock} Cargo.lock

    # Add patch adding the collection variant to rspotify used by spotify-tu
    # This fixes the issue of getting an error when playing liked songs
    # see https://github.com/NixOS/nixpkgs/pull/170915
    patch -p1 -d $cargoDepsCopy/rspotify-0.10.0 < ${./0001-Add-Collection-SearchType.patch}
  '';

  postInstall = ''
    for shell in bash fish zsh; do
      $out/bin/spt --completions $shell > spt.$shell
      installShellCompletion spt.$shell
    done
  '';

  meta = with lib; {
    description = "Spotify for the terminal written in Rust";
    homepage = "https://github.com/Rigellute/spotify-tui";
    changelog = "https://github.com/Rigellute/spotify-tui/blob/v${version}/CHANGELOG.md";
    license = with licenses; [ mit /* or */ asl20 ];
    maintainers = with maintainers; [ jwijenbergh ];
    mainProgram = "spt";
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -1103,6 +1103,7 @@ mapAliases ({
  spice-gtk_libsoup2 = throw "'spice-gtk_libsoup2' has been renamed to/replaced by 'spice-gtk'"; # Added 2023-02-21
  # spidermonkey is not ABI upwards-compatible, so only allow this for nix-shell
  spidermonkey = spidermonkey_78; # Added 2020-10-09
  spotify-tui = throw "'spotify-tui' has been removed, as it was broken and unmaintained"; # Added 2024-03-12
  spotify-unwrapped = spotify; # added 2022-11-06
  spring-boot = spring-boot-cli; # added 2020-04-24
  squid4 = throw "'squid4' has been renamed to/replaced by 'squid'"; # Converted to throw 2023-09-10
+0 −4
Original line number Diff line number Diff line
@@ -34882,10 +34882,6 @@ with pkgs;
  spotify-tray = callPackage ../applications/misc/spotify-tray { };
  spotify-tui = callPackage ../applications/audio/spotify-tui {
    inherit (darwin.apple_sdk.frameworks) AppKit Security;
  };
  sptlrx = callPackage ../applications/audio/sptlrx { };
  sptk = callPackage ../development/libraries/sptk { };