anchor.diff:      # bs1770gain, and set the absolute path there, to avoid impurities.
       ++ lib.optional enableReplaygain (substituteAll {
         src = ./replaygain-default-ffmpeg.patch;
  -      ffmpeg = getBin ffmpeg;
  +      ffmpeg = lib.getBin ffmpeg;
       })
       # Put absolute Nix paths in place
       ++ lib.optional enableConvert (substituteAll {
         src = ./convert-plugin-ffmpeg-path.patch;
  -      ffmpeg = getBin ffmpeg;
  +      ffmpeg = lib.getBin ffmpeg;
       })
       ++ lib.optional enableBadfiles (substituteAll {
         src = ./badfiles-plugin-nix-paths.patch;
  
positive.code:               || enableSubsonicupdate
                || enableAcousticbrainz)
                                      pythonPackages.requests
      ++ optional enableCheck         beetsExternalPlugins.check
      ++ optional enableConvert       ffmpeg
      ++ optional enableDiscogs       pythonPackages.discogs_client
      ++ optional enableGmusic        pythonPackages.gmusicapi
      ++ optional enableKeyfinder     keyfinder-cli
      ++ optional enableLastfm        pythonPackages.pylast
      ++ optional enableMpd           pythonPackages.mpd2
      ++ optional enableSonosUpdate   pythonPackages.soco
      ++ optional enableThumbnails    pythonPackages.pyxdg
      ++ optional enableWeb           pythonPackages.flask
      ++ optional enableAlternatives  beetsExternalPlugins.alternatives
      ++ optional enableCopyArtifacts beetsExternalPlugins.copyartifacts
      ++ optional enableExtraFiles    beetsExternalPlugins.extrafiles
    ;
  
    buildInputs = [
  
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;
    });
  
  