@@ -1,27 +1,34 @@
1−{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, python3, libxcb, AppKit, Security }:
1+{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles, pkgconfig, openssl, python3, libxcb, AppKit, Security }:
22
33rustPlatform.buildRustPackage rec {
44 pname = "spotify-tui";
5− version = "0.22.0";
5+ version = "0.23.0";
66
77 src = fetchFromGitHub {
88 owner = "Rigellute";
99 repo = "spotify-tui";
1010 rev = "v${version}";
11− sha256 = "0w1y37qh9n3936d59hvqzjz2878x2nwxqxc4s7mp4f9xqcfl0c5r";
11+ sha256 = "082y5m2vglzx9kdc2088zynz0njcnljnb0y170igmlsxq9wkrgg2";
1212 };
1313
14− cargoSha256 = "1ri054p08si95x1gh2bkh4fk50ja79c5izzjnkvs0yhfj1wzbghi";
14+ cargoSha256 = "100c7x603qyhav3p24clwfal4ngh0258x9lqsi84kcj4wq2f3i8f";
1515
16− nativeBuildInputs = stdenv.lib.optionals stdenv.isLinux [ pkgconfig python3 ];
16+ nativeBuildInputs = [ installShellFiles ] ++ stdenv.lib.optionals stdenv.isLinux [ pkgconfig python3 ];
1717 buildInputs = [ ]
1818 ++ stdenv.lib.optionals stdenv.isLinux [ openssl libxcb ]
1919 ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ];
2020
21+ postInstall = ''
22+ for shell in bash fish zsh; do
23+ $out/bin/spt --completions $shell > spt.$shell
24+ installShellCompletion spt.$shell
25+ done
26+ '';
27+
2128 meta = with stdenv.lib; {
2229 description = "Spotify for the terminal written in Rust";
2330 homepage = "https://github.com/Rigellute/spotify-tui";
24− changelog = "https://github.com/Rigellute/spotify-tui/releases/tag/v${version}";
31+ changelog = "https://github.com/Rigellute/spotify-tui/blob/v${version}/CHANGELOG.md";
2532 license = licenses.mit;
2633 maintainers = with maintainers; [ jwijenbergh ];
2734 };