diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-12-30 23:13:56 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-12-30 23:13:56 +0100 |
commit | 05f6061d1dea845eb069eebf9dc235fc872d5f89 (patch) | |
tree | 96c5fcd98762bab9b5d9446fcc5948538412de5e | |
parent | 740da53c72e0b2f8a9e645595b300c9d9ad69780 (diff) | |
download | nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.tar nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.tar.gz nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.tar.bz2 nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.tar.lz nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.tar.xz nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.tar.zst nixlib-05f6061d1dea845eb069eebf9dc235fc872d5f89.zip |
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>
-rw-r--r-- | pkgs/tools/audio/beets/default.nix | 24 |
1 files changed, 24 insertions, 0 deletions
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" <<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 = { homepage = http://beets.radbox.org; |