class ChannelTableEntry(types.SimpleNamespace):
+ absolute_url: str
digest: Digest16
file: str
size: int
def fetch_resources(v: Verification, channel: Channel) -> None:
for resource in ['git-revision', 'nixexprs.tar.xz']:
fields = channel.table[resource]
- url = urllib.parse.urljoin(channel.forwarded_url, fields.url)
- fields.file = fetch_with_nix_prefetch_url(v, url, fields.digest)
+ fields.absolute_url = urllib.parse.urljoin(
+ channel.forwarded_url, fields.url)
+ fields.file = fetch_with_nix_prefetch_url(
+ v, fields.absolute_url, fields.digest)
v.status('Verifying git commit on main page matches git commit in table')
v.result(
open(
fetch_resources(v, channel)
git_fetch(v, channel)
check_channel_contents(v, channel)
- print(channel)
+ config[section]['git_rev'] = channel.git_revision
+ config[section]['tarball_url'] = channel.table['nixexprs.tar.xz'].absolute_url
+ config[section]['tarball_sha256'] = channel.table['nixexprs.tar.xz'].digest
+ with open(argv[1], 'w') as configfile:
+ config.write(configfile)
main(sys.argv)