2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, pkg-config, openssl, python3, libxcb, AppKit, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "spotify-tui";
|
2021-01-09 10:05:03 +00:00
|
|
|
version = "0.23.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Rigellute";
|
|
|
|
repo = "spotify-tui";
|
|
|
|
rev = "v${version}";
|
2021-01-09 10:05:03 +00:00
|
|
|
sha256 = "082y5m2vglzx9kdc2088zynz0njcnljnb0y170igmlsxq9wkrgg2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "1khn6fx13qlfpqwnw7ysgan5h4nrg2qnzn2p74vn7jic3mqc3sax";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config python3 ];
|
2020-05-15 21:57:56 +00:00
|
|
|
buildInputs = [ ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ openssl libxcb ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ AppKit Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/spt --completions $shell > spt.$shell
|
|
|
|
installShellCompletion spt.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Spotify for the terminal written in Rust";
|
|
|
|
homepage = "https://github.com/Rigellute/spotify-tui";
|
2021-01-09 10:05:03 +00:00
|
|
|
changelog = "https://github.com/Rigellute/spotify-tui/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jwijenbergh ];
|
|
|
|
};
|
|
|
|
}
|