git.iko.soy/typeable/nixpkgs
on master help sign in
chromium: update.py: Download files from the main repository

The tag 98.0.4710.4 is missing on the official GitHub mirror. As a result the download of the DEPS file was failing (HTTP Error 404: Not Found). Using the upstream repository is obviously better anyway, it's just less obvious how to fetch a file from there (?format=TEXT).

commitb054a8594a1f5136e4ae7aa5f4e76bea95d7aab9 authorMichael Weiss <dev.primeos@gmail.com> dateSat 20 Nov 2021, 18:06 (5 years ago) parent9e06375
1 file changed+4−2
pkgs/applications/networking/browsers/chromium/update.py+4−2
pkgs/applications/networking/browsers/chromium/update.py+4−2
@@ -5,6 +5,7 @@
55via upstream-info.json."""
66# Usage: ./update.py [--commit]
77
8+import base64
89import csv
910import json
1011import re
@@ -48,9 +49,10 @@ def nix_prefetch_git(url, rev):
4849
4950def get_file_revision(revision, file_path):
5051 """Fetches the requested Git revision of the given Chromium file."""
51− url = f'https://raw.githubusercontent.com/chromium/chromium/{revision}/{file_path}'
52+ url = f'https://chromium.googlesource.com/chromium/src/+/refs/tags/{revision}/{file_path}?format=TEXT'
5253 with urlopen(url) as http_response:
53− return http_response.read()
54+ resp = http_response.read()
55+ return base64.b64decode(resp)
5456
5557
5658def get_matching_chromedriver(version):