1

doc: update instructions for building sponsorblock

use nix build instead of git submodules
make sure the scripts directory exists
This commit is contained in:
Himadri Bhattacharjee
2023-12-11 10:39:11 +05:30
parent 9a52c4e292
commit 1c8ee23ad9

View File

@@ -21,17 +21,16 @@ Once the keys are enrolled, we must run the following to rebuild our system from
sudo nixos-rebuild switch --flake .#cafe-secureboot
```
#### Optional: Installing Sponsorblock for mpv
### Sponsorblock for mpv
A fresh install is unlikely to have Rust and thus, the sponsorblock
library won't be installed. Since I won't be uploading the compiled shared
object, you have to compile it yourself. After the first rebuild, run:
Optionally, if you want to block sponsors in mpv, run
```sh
pushd sources/mpv-sponsorblock
cargo build --release --locked
cp ./target/release/libmpv_sponsorblock.so ../mpv/scripts/sponsorblock.so
mkdir sources/mpv/scripts
nix build
cp result/lib/libmpv_sponsorblock.so ../mpv/scripts/sponsorblock.so
popd
```
followed by another rebuild.
followed by another rebuild.