def METHOD_NAME(task, target, binary):
    task['description'] = f'Build {binary} ({target})'
    task['worker-type'] = 'b-osx'
    task['worker'] = {
        'max-run-time': 1800,
        'artifacts': [
            {
                'name': f'public/build/{binary}-{target}.zip',
                'path': f'checkouts/vcs/build/{binary}-{target}.zip',
                'type': 'file',
            }
        ]
    }
    task['run'] = {
        'using': 'run-commands',
        'run-task-command': ["/usr/local/bin/python3", "run-task"],
        'pre-commands': [
            ["source", "taskcluster/scripts/setup-mac-worker.sh"],
            ["source", "taskcluster/scripts/toolchain/setup-fetched-rust-toolchain.sh"],
        ],
        'commands': [
            [ "taskcluster/scripts/nimbus-build-osx.sh", "build/", binary, target ]
        ],
    }
    task['fetches'] = {
        'toolchain': [
            'rust-osx',
        ]
    }