-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spotify-tui: add collection variant patch #170915
spotify-tui: add collection variant patch #170915
Conversation
7040601
to
5ca5747
Compare
5ca5747
to
d96d752
Compare
It fails to build for me: In this branch: nix-build -A spotify-tui . gives: error: failed to sync
Caused by:
failed to load pkg lockfile
Caused by:
failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
Caused by:
failed to load source for dependency `rspotify`
Caused by:
Unable to update /build/source/rspotify-0.10.0
Caused by:
failed to read `/build/source/rspotify-0.10.0/Cargo.toml`
Caused by:
No such file or directory (os error 2)
Traceback (most recent call last):
File "/nix/store/r3nwnppm7n0fbnynfrx2q0dzjz5dgfar-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
main()
File "/nix/store/r3nwnppm7n0fbnynfrx2q0dzjz5dgfar-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
assert list(data.keys()) == ["source"]
AssertionError
error: builder for '/nix/store/a721mj4bc6jzdiw319api0y74fm069mk-spotify-tui-0.25.0-vendor.tar.gz.drv' failed with exit code 1;
last 10 log lines:
> failed to read `/build/source/rspotify-0.10.0/Cargo.toml`
>
> Caused by:
> No such file or directory (os error 2)
> Traceback (most recent call last):
> File "/nix/store/r3nwnppm7n0fbnynfrx2q0dzjz5dgfar-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
> main()
> File "/nix/store/r3nwnppm7n0fbnynfrx2q0dzjz5dgfar-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
> assert list(data.keys()) == ["source"]
> AssertionError
For full logs, run 'nix log /nix/store/a721mj4bc6jzdiw319api0y74fm069mk-spotify-tui-0.25.0-vendor.tar.gz.drv'.
error: 1 dependencies of derivation '/nix/store/3750ndflrd18gxkfrvwa024sxphza6a2-spotify-tui-0.25.0.drv' failed to build Any idea why? |
Oh I also had this error previously. I think because the rspotify-0.10.0 directory does not get copied correctly. But it is weird, that it builds on my machine. I'll clear my cached nix store builds and have another look... |
Maybe you have a better idea how to patch rspotify and use it in the |
I am also honestly not sure how to do this, I don't have too much rust/nix packaging experience. I tried to find similar packages in nixpkgs that do this, but I couldn't find any. Simply replacing a rust crate with a patched crate doesn't seem like an odd thing to do, so I'm not sure why I can't figure it out |
d96d752
to
0631c95
Compare
Could you try again now? |
Result of 1 package built:
|
works now using Anyways, I can't seem to reproduce the upstream issue of the inability to play liked song, they play fine for me. But I guess it depends on your spotify account? If this patch fixes things for you then LGTM, it's better if upstream would move to a newer rspotify version though... But for now this will do. |
Yeah I thougt about that as well, but apparently they are just joined together if I read the source correctly. But hey if it works
For me, it only occurred when I previously played my liked songs on my mobile phone or via the web client, and never through spotify-tui.
And I agree that an upstream update would be best, but as far as I understood rspotify had a lot of breaking changes, so it would take a considerable effort. |
If it works it works!
Ah yes, can confirm that this fixes the issue. I could reproduce it by playing something on my phone in liked songs and then opening spotify-tui
Yeah exactly, rspotify 0.11.0 apparently has a lot of breaking changes/api changes. Anyways thanks for the patch! |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
cargoPatches = [ | ||
./Cargo.lock.patch | ||
]; | ||
patches = [ | ||
./Cargo.toml.patch | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargoPatches = [ | |
./Cargo.lock.patch | |
]; | |
patches = [ | |
./Cargo.toml.patch | |
]; | |
cargoPatches = [ | |
./Cargo.lock.patch | |
]; |
and I would suggest to combine the patch into one file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described above, the derivation strangely won't build if the patches are applied through one patch file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @MoritzBoehme said, we have tried this already
Co-authored-by: Sandro <[email protected]>
b0c67fc
to
54b7074
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good!
Description of changes
Add patch adding the collection variant to rspotify used by spotify-tui.
Rigellute/spotify-tui#960 (comment)
This fixes the issue of getting an error when playing liked songs. Rigellute/spotify-tui#960
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes