diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..17d6464 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_nix \ No newline at end of file diff --git a/README.md b/README.md index 30b0bc0..c484325 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +earnest's personal clone of spotify-adblock (build helped with Nix) on a foreign system, lol + +You should have [Spotify installed through the Debian package](https://www.spotify.com/ca-en/download/linux/) and probably `build-essential` and `git` installed as well. + # spotify-adblock Spotify adblocker for Linux (macOS untested) that works by wrapping `getaddrinfo` and `cef_urlrequest_create`. It blocks requests to domains that are not on the allowlist, as well as URLs that are on the denylist. diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..ae06776 --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = [ + pkgs.gnumake + # Rust + pkgs.cargo + pkgs.rustc + pkgs.rustfmt + ]; + + # Per https://nixos.wiki/wiki/Rust + # Certain Rust tools won't work without this + # This can also be fixed by using oxalica/rust-overlay and specifying the rust-src extension + # See https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/3?u=samuela. for more details. + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; +}