anchor.diff:      };
     };
   
  -  mkSub = name: subCommands: writeScriptBin name ''
  +  mkSub = name: subCommands: defaultBinary: writeScriptBin name ''
       #!${stdenv.shell}
   
       case "$1" in
  
positive.code:         default = null;
        };
  
        package = mkOption {
          type = types.package;
          default = with config; (
            if subCommands == {} && steps == {} then
              throw "The command ${name} has no sub commands or steps defined"
            else if subCommands != {} && steps != {} then
              throw "The command ${name} has both sub commands and steps defined"
            else if subCommands != {} then mkSub name subCommands
            else mkSteps name true config.maxParallelism steps
          );
        };
  
negative.code:         ;;
      '') subCommands)}
      *)
        ${if defaultBinary == null then ''
          echo >&2 "Unknown sub command $1"
          exit 1
        '' else ''
          exec "${defaultBinary}" "$@"
        ''}
        ;;
      esac
    '';
  