anchor.diff:      EDITOR="${writeScript "beetconfig.sh" ''
         #!${runtimeShell}
         cat > "$1" <<CFG
  -      plugins: ${concatStringsSep " " allEnabledPlugins}
  +      plugins: ${lib.concatStringsSep " " allEnabledPlugins}
         CFG
       ''}" HOME="$tmphome" "$out/bin/beet" config -e
       EDITOR=true HOME="$tmphome" "$out/bin/beet" config -e
  
positive.code:     pythonPackages.confuse
      pythonPackages.mediafile
      gobject-introspection
    ] ++ optional enableAbsubmit      essentia-extractor
      ++ optional enableAcoustid      pythonPackages.pyacoustid
      ++ optional enableBeatport      pythonPackages.requests_oauthlib
      ++ optional (enableFetchart
                || enableDeezer
                || enableEmbyupdate
                || enableKodiupdate
  
negative.code:     "types" "unimported" "zero"
    ];
  
    enabledOptionalPlugins = lib.attrNames (lib.filterAttrs (_: lib.id) optionalPlugins);
  
    allPlugins = pluginsWithoutDeps ++ lib.attrNames optionalPlugins;
    allEnabledPlugins = pluginsWithoutDeps ++ enabledOptionalPlugins;
  
    testShell = "${bashInteractive}/bin/bash --norc";
    completion = "${bash-completion}/share/bash-completion/bash_completion";
  
    # This is a stripped down beets for testing of the external plugins.
    externalTestArgs.beets = (lib.beets.override {
      enableAlternatives = false;
      enableCopyArtifacts = false;
      enableExtraFiles = false;
    }).overrideAttrs (lib.const {
      doInstallCheck = false;
    });
  
  