From 41e965ea48b82a5fc9c02ad36662db5abe936123 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 30 Dec 2014 23:13:56 +0100 Subject: [PATCH] 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 --- pkgs/tools/audio/beets/default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index fa08f5980c3f..7e14154eb201 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -53,6 +53,10 @@ let enabledOptionalPlugins = attrNames (filterAttrs (_: id) 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"; completion = "${bashCompletion}/share/bash-completion/bash_completion"; @@ -143,6 +147,26 @@ in buildPythonPackage rec { runHook postCheck ''; + doInstallCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + + tmphome="$(mktemp -d)" + + EDITOR="${writeScript "beetconfig.sh" '' + #!${stdenv.shell} + cat > "$1" <