git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #146805 from primeos/chromium

chromium: update.py: Download files from the main repository

commitf7daa17766e6eef9a0031f7fc6a823de35da85e7 authorMichael Weiss <dev.primeos@gmail.com> dateSat 20 Nov 2021, 23:14 (5 years ago) parentb8057deb054a85
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):