mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-24 14:40:07 +03:00
beets: Check dependencies on activated plugins.
Beets tries to load oll activated plugins on "beet config -e" (however only on the second run, thus the dummy), so we just pass all activated plugins into a generated config file and bail out on any errors. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
7ae9c48254
commit
41e965ea48
@ -53,6 +53,10 @@ let
|
|||||||
enabledOptionalPlugins = attrNames (filterAttrs (_: id) optionalPlugins);
|
enabledOptionalPlugins = attrNames (filterAttrs (_: id) optionalPlugins);
|
||||||
|
|
||||||
allPlugins = pluginsWithoutDeps ++ attrNames optionalPlugins;
|
allPlugins = pluginsWithoutDeps ++ attrNames optionalPlugins;
|
||||||
|
allEnabledPlugins = pluginsWithoutDeps ++ enabledOptionalPlugins;
|
||||||
|
|
||||||
|
# Discogs plugin wants to have an API token, so skip install checks.
|
||||||
|
allTestablePlugins = remove "discogs" allEnabledPlugins;
|
||||||
|
|
||||||
testShell = "${bashInteractive}/bin/bash --norc";
|
testShell = "${bashInteractive}/bin/bash --norc";
|
||||||
completion = "${bashCompletion}/share/bash-completion/bash_completion";
|
completion = "${bashCompletion}/share/bash-completion/bash_completion";
|
||||||
@ -143,6 +147,26 @@ in buildPythonPackage rec {
|
|||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
|
installCheckPhase = ''
|
||||||
|
runHook preInstallCheck
|
||||||
|
|
||||||
|
tmphome="$(mktemp -d)"
|
||||||
|
|
||||||
|
EDITOR="${writeScript "beetconfig.sh" ''
|
||||||
|
#!${stdenv.shell}
|
||||||
|
cat > "$1" <<CFG
|
||||||
|
plugins: ${concatStringsSep " " allTestablePlugins}
|
||||||
|
musicbrainz:
|
||||||
|
user: dummy
|
||||||
|
pass: dummy
|
||||||
|
CFG
|
||||||
|
''}" HOME="$tmphome" "$out/bin/beet" config -e
|
||||||
|
EDITOR=true HOME="$tmphome" "$out/bin/beet" config -e
|
||||||
|
|
||||||
|
runHook postInstallCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://beets.radbox.org;
|
homepage = http://beets.radbox.org;
|
||||||
|
Loading…
Reference in New Issue
Block a user