beets: Add dependencies for "badfiles" plugin.
I have to admit that I did very poor testing ind7307d8and didn't notice that the "badfiles" plugin relies on mp3val (thanks to @devhell for packaging in6e1ef13) and flac to be actually useful. We now patch in the store locations of these binaries and make "badfiles" an optional dependency (though enabled by default). Now, I have tested "beet bad" on my whole music collection and it worked fine (well, it has found errors... but that's what it is for). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
, buildPythonPackage, pythonPackages, python, imagemagick
|
||||
|
||||
, enableAcoustid ? true
|
||||
, enableBadfiles ? true, flac ? null, mp3val ? null
|
||||
, enableDiscogs ? true
|
||||
, enableEchonest ? true
|
||||
, enableFetchart ? true
|
||||
@@ -15,6 +16,7 @@
|
||||
}:
|
||||
|
||||
assert enableAcoustid -> pythonPackages.pyacoustid != null;
|
||||
assert enableBadfiles -> flac != null && mp3val != null;
|
||||
assert enableDiscogs -> pythonPackages.discogs_client != null;
|
||||
assert enableEchonest -> pythonPackages.pyechonest != null;
|
||||
assert enableFetchart -> pythonPackages.responses != null;
|
||||
@@ -28,6 +30,7 @@ with stdenv.lib;
|
||||
|
||||
let
|
||||
optionalPlugins = {
|
||||
badfiles = enableBadfiles;
|
||||
chroma = enableAcoustid;
|
||||
discogs = enableDiscogs;
|
||||
echonest = enableEchonest;
|
||||
@@ -42,10 +45,10 @@ let
|
||||
};
|
||||
|
||||
pluginsWithoutDeps = [
|
||||
"badfiles" "bench" "bpd" "bpm" "bucket" "convert" "cue" "duplicates"
|
||||
"embedart" "filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy"
|
||||
"ihate" "importadded" "importfeeds" "info" "inline" "ipfs" "keyfinder"
|
||||
"lyrics" "mbcollection" "mbsync" "metasync" "missing" "permissions" "play"
|
||||
"bench" "bpd" "bpm" "bucket" "convert" "cue" "duplicates" "embedart"
|
||||
"filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy" "ihate"
|
||||
"importadded" "importfeeds" "info" "inline" "ipfs" "keyfinder" "lyrics"
|
||||
"mbcollection" "mbsync" "metasync" "missing" "permissions" "play"
|
||||
"plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the"
|
||||
"types" "zero"
|
||||
];
|
||||
@@ -111,6 +114,11 @@ in buildPythonPackage rec {
|
||||
sed -i -e '/^BASH_COMPLETION_PATHS *=/,/^])$/ {
|
||||
/^])$/i u"${completion}"
|
||||
}' beets/ui/commands.py
|
||||
'' + optionalString enableBadfiles ''
|
||||
sed -i -e '/self\.run_command(\[/ {
|
||||
s,"flac","${flac}/bin/flac",
|
||||
s,"mp3val","${mp3val}/bin/mp3val",
|
||||
}' beetsplug/badfiles.py
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
Reference in New Issue
Block a user