packages/spotify-adblock: update cargo hash and patch
This commit is contained in:
parent
416aa9e921
commit
466a79e619
2 changed files with 2 additions and 10 deletions
|
|
@ -11,19 +11,11 @@ diff --git a/src/lib.rs b/src/lib.rs
|
|||
index 5a0d7bd961e..86f2ac04ebf 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -7,6 +7,7 @@ use lazy_static::lazy_static;
|
||||
use libc::{addrinfo, c_char, dlsym, EAI_FAIL, RTLD_NEXT};
|
||||
use regex::Regex;
|
||||
use serde::Deserialize;
|
||||
+use std::env;
|
||||
use std::ffi::CStr;
|
||||
use std::fs::read_to_string;
|
||||
use std::mem;
|
||||
@@ -44,6 +45,7 @@ struct Config {
|
||||
lazy_static! {
|
||||
static ref CONFIG: Config = {
|
||||
let config_paths = vec![
|
||||
+ PathBuf::from(env::var("SPOTIFY_ADBLOCK_CONFIG").unwrap_or("".into())),
|
||||
+ PathBuf::from(std::env::var("SPOTIFY_ADBLOCK_CONFIG").unwrap_or("".into())),
|
||||
PathBuf::from("config.toml"),
|
||||
#[allow(deprecated)] // std::env::home_dir() is only broken on Windows
|
||||
std::env::home_dir().unwrap().join(".config/spotify-adblock/config.toml"),
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ rustPlatform.buildRustPackage {
|
|||
version = "1.0";
|
||||
src = inputs.spotify-adblock;
|
||||
|
||||
cargoSha256 = "sha256-07vswkW0BZCEg8Z/cS71bbkJ546k+YI38HN5bdIqTPU=";
|
||||
cargoSha256 = "sha256-t8OVQEp4M0H7gTGaP/2KBChRvAyhWCWV+6d/tPXa3/k=";
|
||||
|
||||
patches = [ ./0002-allow-setting-config-from-environment-variable.patch ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue