beets: Add dependencies for "badfiles" plugin.
I have to admit that I did very poor testing in d7307d8 and didn't notice that the "badfiles" plugin relies on mp3val (thanks to @devhell for packaging in 6e1ef13) 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:
parent
c870333b0b
commit
f864ef703e
@ -2,6 +2,7 @@
|
|||||||
, buildPythonPackage, pythonPackages, python, imagemagick
|
, buildPythonPackage, pythonPackages, python, imagemagick
|
||||||
|
|
||||||
, enableAcoustid ? true
|
, enableAcoustid ? true
|
||||||
|
, enableBadfiles ? true, flac ? null, mp3val ? null
|
||||||
, enableDiscogs ? true
|
, enableDiscogs ? true
|
||||||
, enableEchonest ? true
|
, enableEchonest ? true
|
||||||
, enableFetchart ? true
|
, enableFetchart ? true
|
||||||
@ -15,6 +16,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
assert enableAcoustid -> pythonPackages.pyacoustid != null;
|
assert enableAcoustid -> pythonPackages.pyacoustid != null;
|
||||||
|
assert enableBadfiles -> flac != null && mp3val != null;
|
||||||
assert enableDiscogs -> pythonPackages.discogs_client != null;
|
assert enableDiscogs -> pythonPackages.discogs_client != null;
|
||||||
assert enableEchonest -> pythonPackages.pyechonest != null;
|
assert enableEchonest -> pythonPackages.pyechonest != null;
|
||||||
assert enableFetchart -> pythonPackages.responses != null;
|
assert enableFetchart -> pythonPackages.responses != null;
|
||||||
@ -28,6 +30,7 @@ with stdenv.lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
optionalPlugins = {
|
optionalPlugins = {
|
||||||
|
badfiles = enableBadfiles;
|
||||||
chroma = enableAcoustid;
|
chroma = enableAcoustid;
|
||||||
discogs = enableDiscogs;
|
discogs = enableDiscogs;
|
||||||
echonest = enableEchonest;
|
echonest = enableEchonest;
|
||||||
@ -42,10 +45,10 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
pluginsWithoutDeps = [
|
pluginsWithoutDeps = [
|
||||||
"badfiles" "bench" "bpd" "bpm" "bucket" "convert" "cue" "duplicates"
|
"bench" "bpd" "bpm" "bucket" "convert" "cue" "duplicates" "embedart"
|
||||||
"embedart" "filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy"
|
"filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy" "ihate"
|
||||||
"ihate" "importadded" "importfeeds" "info" "inline" "ipfs" "keyfinder"
|
"importadded" "importfeeds" "info" "inline" "ipfs" "keyfinder" "lyrics"
|
||||||
"lyrics" "mbcollection" "mbsync" "metasync" "missing" "permissions" "play"
|
"mbcollection" "mbsync" "metasync" "missing" "permissions" "play"
|
||||||
"plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the"
|
"plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the"
|
||||||
"types" "zero"
|
"types" "zero"
|
||||||
];
|
];
|
||||||
@ -111,6 +114,11 @@ in buildPythonPackage rec {
|
|||||||
sed -i -e '/^BASH_COMPLETION_PATHS *=/,/^])$/ {
|
sed -i -e '/^BASH_COMPLETION_PATHS *=/,/^])$/ {
|
||||||
/^])$/i u"${completion}"
|
/^])$/i u"${completion}"
|
||||||
}' beets/ui/commands.py
|
}' 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;
|
doCheck = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user