anchor.diff:        type = types.lines;
         default = "";
         example = ''
  -        # 'brew tap' with custom Git URL
  -        tap "user/tap-repo", "https://user@bitbucket.org/user/homebrew-tap-repo.git"
  -
           # 'brew install --with-rmtp', 'brew services restart' on version changes
           brew "denji/nginx/nginx-full", args: ["with-rmtp"], restart_service: :changed
           # 'brew install', always 'brew services restart', 'brew link', 'brew unlink mysql' (if it is installed)
  
positive.code:         description = "Whether to disable linking of helper executables.";
        };
  
        brewfileLine = mkOption {
          type = types.nullOr types.str;
          visible = false;
          internal = true;
          readOnly = true;
        };
      };
  
      config =
        let
          configuredOptions = filterAttrs (_: v: v != null) (removeAttrs config [ "_module" "brewfileLine" ]);
        in
        {
          brewfileLine =
            if configuredOptions == {}
            then null
            else "cask_args " + mkBrewfileLineOptionsListString configuredOptions;
        };
    };
  
negative.code:     default = null;
    });
  
    mkBrewfileLineOption = mkOption {
      type = types.nullOr types.str;
      visible = false;
      internal = true;
      readOnly = true;
    };
  
    tapOptions = { config, ... }: {
      options = {
        name = mkOption {
          type = types.str;
          example = "homebrew/cask-fonts";
          description = ''
            When <option>clone_target</option> is unspecified, this is the name of a formula
            repository to tap from GitHub using HTTPS. For example, <literal>"user/repo"</literal> will
            tap https://github.com/user/homebrew-repo.
          '';
        };
        clone_target = mkNullOrStrOption {
          description = ''
            Use this option to tap a formula repository from anywhere, using any transport protocol
            that <command>git</command> handles. When <option>clone_target</option> is specified, taps
            can be cloned from places other than GitHub and using protocols other than HTTPS, e.g.,
            SSH, git, HTTP, FTP(S), rsync.
          '';
        };
        force_auto_update = mkNullOrBoolOption {
          description = ''
            Whether to auto-update the tap even if it is not hosted on GitHub. By default, only taps
            hosted on GitHub are auto-updated (for performance reasons).
          '';
        };
  
        brewfileLine = mkBrewfileLineOption;
      };
  
      config = {
        brewfileLine = ''tap "${config.name}"''
          + optionalString (config.clone_target != null) '', "${config.clone_target}"''
          + optionalString (config.force_auto_update != null)
            ", force_auto_update: ${boolToString config.force_auto_update}";
      };
    };
  
    # Sourced from https://docs.brew.sh/Manpage#global-cask-options
    # and valid values for `HOMEBREW_CASK_OPTS`.
    caskArgsOptions = { config, ... }: {
  