···8899}:1010# The return value of this function will be an attrset with arbitrary depth and1111-# the `anything` returned by callTest at its test leafs.1111+# the `anything` returned by callTest at its test leaves.1212# The tests not supported by `system` will be replaced with `{}`, so that1313# `passthru.tests` can contain links to those without breaking on architectures1414# where said tests are unsupported.···655655 jool = import ./jool.nix { inherit pkgs runTest; };656656 jotta-cli = handleTest ./jotta-cli.nix { };657657 k3s = handleTest ./k3s { };658658- kafka = handleTest ./kafka.nix { };658658+ kafka = handleTest ./kafka { };659659 kanboard = runTest ./web-apps/kanboard.nix;660660 kanidm = handleTest ./kanidm.nix { };661661 kanidm-provisioning = handleTest ./kanidm-provisioning.nix { };
···11{22 lib,33+ config,34 python3,45 emptyFile,56}:···2928 };30293130 plugins =3232- ps: _super: with ps; rec {3333- nixops-digitalocean = callPackage ./plugins/nixops-digitalocean.nix { };3434- nixops-encrypted-links = callPackage ./plugins/nixops-encrypted-links.nix { };3535- nixops-hercules-ci = callPackage ./plugins/nixops-hercules-ci.nix { };3636- nixops-vbox = callPackage ./plugins/nixops-vbox.nix { };3737- nixos-modules-contrib = callPackage ./plugins/nixos-modules-contrib.nix { };3131+ ps: _super:3232+ with ps;3333+ (3434+ rec {3535+ nixops-digitalocean = callPackage ./plugins/nixops-digitalocean.nix { };3636+ nixops-encrypted-links = callPackage ./plugins/nixops-encrypted-links.nix { };3737+ nixops-hercules-ci = callPackage ./plugins/nixops-hercules-ci.nix { };3838+ nixops-vbox = callPackage ./plugins/nixops-vbox.nix { };3939+ nixos-modules-contrib = callPackage ./plugins/nixos-modules-contrib.nix { };38403939- nixops-aws = throw "nixops-aws was broken and was removed from nixpkgs";4040- nixops-gce = throw "nixops-gce was broken and was removed from nixpkgs";4141- nixops-libvirtd = throw "nixops-libvirtd was broken and was removed from nixpkgs";4242- nixops-hetzner = throw "nixops-hetzner was broken and was removed from nixpkgs";4343- nixops-hetznercloud = throw "nixops-hetznercloud was broken and was removed from nixpkgs";4444-4545- # aliases for backwards compatibility4646- nixops-virtd = nixops-libvirtd;4747- nixopsvbox = nixops-vbox;4848- };4141+ # aliases for backwards compatibility4242+ nixopsvbox = nixops-vbox;4343+ }4444+ // lib.optionalAttrs config.allowAliases rec {4545+ nixops-aws = throw "nixops-aws was broken and was removed from nixpkgs";4646+ nixops-gce = throw "nixops-gce was broken and was removed from nixpkgs";4747+ nixops-libvirtd = throw "nixops-libvirtd was broken and was removed from nixpkgs";4848+ nixops-hetzner = throw "nixops-hetzner was broken and was removed from nixpkgs";4949+ nixops-hetznercloud = throw "nixops-hetznercloud was broken and was removed from nixpkgs";5050+ nixops-virtd = nixops-libvirtd;5151+ }5252+ );49535054 # We should not reapply the overlay, but it tends to work out. (It's been this way since poetry2nix was dropped.)5155 availablePlugins = this.plugins this.python.pkgs this.python.pkgs;
···4343 doCheck = false;44444545 meta = with lib; {4646- description = "Cargo plugin to generate list of all licenses for a crate";4646+ description = "Cargo plugin for linting your dependencies";4747 mainProgram = "cargo-deny";4848 homepage = "https://github.com/EmbarkStudios/cargo-deny";4949 changelog = "https://github.com/EmbarkStudios/cargo-deny/blob/${version}/CHANGELOG.md";
···11-{22- lib,33- stdenv,44- fetchFromGitHub,55- ncurses,66- hdate,77- lua5_2,88-}:99-1010-stdenv.mkDerivation rec {1111- version = "12010904";1212- pname = "dozenal";1313- src = fetchFromGitHub {1414- owner = "dgoodmaniii";1515- repo = "dozenal";1616- rev = "v${version}";1717- sha256 = "1ic63gpdda762x6ks3al71dwgmsy2isicqyr2935bd245jx8s209";1818- };1919- makeFlags = [2020- # author do not use configure and prefix directly using $prefix2121- "prefix=$(out)"2222- # graphical version of dozdc requires xforms, which is not i nixpkgs so I turned it down2323- "XFORMS_FLAGS=-UXFORMS"2424- "LUALIB=-llua"2525- "bindir=$(prefix)/bin/"2626- ];2727- # some include hardcodes the lua libraries path. This is a patch for that2828- patches = [ ./lua-header.patch ];2929- preBuild = "cd dozenal";3030- buildInputs = [3131- ncurses3232- hdate3333- lua5_23434- ];3535-3636- # Parallel builds fail due to no dependencies between subdirs.3737- # As a result some subdirs are atempted to build twice:3838- # ../dec/dec.c:39:10: fatal error: conv.h: No such file or directory3939- # Let's disable parallelism until it's fixed upstream:4040- # https://gitlab.com/dgoodmaniii/dozenal/-/issues/84141- enableParallelBuilding = false;4242-4343- # I remove gdozdc, as I didn't figure all it's dependency yet.4444- postInstall = "rm $out/bin/gdozdc";4545-4646- meta = {4747- description = "Complete suite of dozenal (base twelve) programs";4848- longDescription = ''4949- Programs5050-5151- doz --- a converter; converts decimal numbers into dozenal. Accepts5252- input in standard or exponential notation (i.e., "1492.2" or "1.4922e3").5353- dec --- a converter; converts dozenal numbers into decimal. Accepts input5454- in standard or exponential notation (i.e., "X44;4" or "X;444e2").5555- dozword --- converts a dozenal number (integers only) into words,5656- according to the Pendlebury system.5757- dozdc --- a full-featured scientific calculator which works in the5858- dozenal base. RPN command line.5959- tgmconv --- a converter for all standard measurements; converts to and6060- from TGM, Imperial, customary, and SI metric.6161- dozpret --- a pretty-printer for dozenal numbers; inserts spacing (or6262- other characters) as desired, and can also transform transdecimal digits6363- from 'X' to 'E' into any character or sequence of characters desired.6464- dozdate --- a more-or-less drop-in replacement for GNU and BSD date, it6565- outputs the date and time in dozenal, as well as containing some TGM6666- extensions.6767- dozstring --- a simple byte converter; absorbs a string either from6868- standard input or a command line argument, leaving it identical but6969- for the numbers, which it converts into dozenal. Options for padding7070- and for not converting specific numbers.7171- doman --- a converter which takes a dozenal integer and7272- emits its equivalent in a non-place-value system, such as7373- Roman numerals. Arbitrary ranks and symbols may be used.7474- Defaults to dozenal Roman numerals.7575- '';7676- homepage = "https://github.com/dgoodmaniii/dozenal/";7777- maintainers = with lib.maintainers; [ CharlesHD ];7878- license = lib.licenses.gpl3;7979- };8080-}
···1111 # and make sure the version regex is up to date here.1212 # Ensure you also check ../mattermost/package.nix for ESR releases.1313 regex = "^v(10\\.[0-9]+\\.[0-9]+)$";1414- version = "10.6.0";1515- srcHash = "sha256-GnXxhhbOKJezUAyKRBbn5IE22gzsn80mwnPANOT9Qu4=";1414+ version = "10.6.1";1515+ srcHash = "sha256-xCrjJc6JCZXnCZ5lJ3o1bRbt7sxlEmcWeiw2cKmyWG0=";1616 vendorHash = "sha256-wj+bAQNJSs9m2SSfl+Ipm965iAhKQ2v1iMjH7I79qf4=";1717 npmDepsHash = "sha256-MdLfjLmizFbLfSqOdAZ+euXomB2ZPjZOqspQYnyHcuk=";1818 lockfileOverlay = ''
···5151 find . -type f -name "CMakeLists.txt" -exec sed -i "/BridgeSetup\\.cmake/d" {} \;52525353 # Use the available ICU version5454- sed -i "s/libicu\(i18n\|uc\|data\)\.so\.56/libicu\1.so/g" bridge-gui/DeployLinux.cmake5454+ sed -i "s/libicu\(i18n\|uc\|data\)\.so\.[0-9][0-9]/libicu\1.so/g" bridge-gui/DeployLinux.cmake55555656 # Create a Desktop Entry that uses a `protonmail-bridge-gui` binary without upstream's launcher5757 sed "s/^\(Icon\|Exec\)=.*$/\1=protonmail-bridge-gui/" ../../../dist/proton-bridge.desktop > proton-bridge-gui.desktop
···11111212stdenv.mkDerivation rec {1313 pname = "signal-cli";1414- version = "0.13.13";1414+ version = "0.13.14";15151616 # Building from source would be preferred, but is much more involved.1717 src = fetchurl {1818 url = "https://github.com/AsamK/signal-cli/releases/download/v${version}/signal-cli-${version}.tar.gz";1919- hash = "sha256-nSaf8VkHxuAvedUhFAIeagOxKYNxp3hi0zH6BbomtMQ=";1919+ hash = "sha256-TKAUSVIBF9FVbwZYc5R3ZsVecF/RsII1nl7GuITxAoc=";2020 };21212222 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
···18181919buildPythonPackage rec {2020 pname = "radish-bdd";2121- version = "0.18.1";2121+ version = "0.18.2";2222 format = "setuptools";23232424 disabled = pythonOlder "3.10";···2727 owner = pname;2828 repo = "radish";2929 tag = "v${version}";3030- hash = "sha256-VCxqhTr0vHJ14tm/0zw/v9bCOQ2q4rzHv40NVYwI254=";3030+ hash = "sha256-SSrEKGs4q4rcnQM03/gc0/vEb7gmTmpfgeNp3e+Hyvg=";3131 };32323333 propagatedBuildInputs = [···5252 meta = with lib; {5353 description = "Behaviour-Driven-Development tool for python";5454 homepage = "https://radish-bdd.github.io/";5555- changelog = "https://github.com/radish-bdd/radish/blob/v${version}/CHANGELOG.md";5555+ changelog = "https://github.com/radish-bdd/radish/blob/${src.tag}/CHANGELOG.md";5656 license = licenses.mit;5757 maintainers = with maintainers; [5858 kalbasit
+216
pkgs/development/tools/electron/binary/update.py
···11+#! /usr/bin/env nix-shell22+#! nix-shell -i python -p python3.pkgs.click python3.pkgs.click-log nix33+"""44+electron updater55+66+A script for updating binary hashes.77+88+It supports the following modes:99+1010+| Mode | Description |1111+|------------- | ----------------------------------------------- |1212+| `update` | for updating a specific Electron release |1313+| `update-all` | for updating all electron releases at once |1414+1515+The `update` command requires a `--version` flag1616+to specify the major release to be update.1717+The `update-all` command updates all non-eol major releases.1818+1919+The `update` and `update-all` commands accept an optional `--commit`2020+flag to automatically commit the changes for you.2121+"""2222+import logging2323+import os2424+import subprocess2525+import sys2626+import click2727+import click_log2828+2929+from typing import Tuple3030+os.chdir(os.path.dirname(__file__))3131+sys.path.append("..")3232+from update_util import *3333+3434+3535+# Relatice path to the electron-bin info.json3636+BINARY_INFO_JSON = "info.json"3737+3838+# Relative path the the electron-chromedriver info.json3939+CHROMEDRIVER_INFO_JSON = "../chromedriver/info.json"4040+4141+logger = logging.getLogger(__name__)4242+click_log.basic_config(logger)4343+4444+4545+systems = {4646+ "i686-linux": "linux-ia32",4747+ "x86_64-linux": "linux-x64",4848+ "armv7l-linux": "linux-armv7l",4949+ "aarch64-linux": "linux-arm64",5050+ "x86_64-darwin": "darwin-x64",5151+ "aarch64-darwin": "darwin-arm64",5252+}5353+5454+def get_shasums256(version: str) -> list:5555+ """Returns the contents of SHASUMS256.txt"""5656+ try:5757+ called_process: subprocess.CompletedProcess = subprocess.run(5858+ [5959+ "nix-prefetch-url",6060+ "--print-path",6161+ f"https://github.com/electron/electron/releases/download/v{version}/SHASUMS256.txt",6262+ ],6363+ capture_output=True,6464+ check=True,6565+ text=True,6666+ )6767+6868+ hash_file_path = called_process.stdout.split("\n")[1]6969+7070+ with open(hash_file_path, "r") as f:7171+ return f.read().split("\n")7272+7373+ except subprocess.CalledProcessError as err:7474+ print(err.stderr)7575+ sys.exit(1)7676+7777+7878+def get_headers(version: str) -> str:7979+ """Returns the hash of the release headers tarball"""8080+ try:8181+ called_process: subprocess.CompletedProcess = subprocess.run(8282+ [8383+ "nix-prefetch-url",8484+ f"https://artifacts.electronjs.org/headers/dist/v{version}/node-v{version}-headers.tar.gz",8585+ ],8686+ capture_output=True,8787+ check=True,8888+ text=True,8989+ )9090+ return called_process.stdout.split("\n")[0]9191+ except subprocess.CalledProcessError as err:9292+ print(err.stderr)9393+ sys.exit(1)9494+9595+9696+def get_electron_hashes(major_version: str) -> dict:9797+ """Returns a dictionary of hashes for a given major version"""9898+ m, _ = get_latest_version(major_version)9999+ version: str = m["version"]100100+101101+ out = {}102102+ out[major_version] = {103103+ "hashes": {},104104+ "version": version,105105+ }106106+107107+ hashes: list = get_shasums256(version)108108+109109+ for nix_system, electron_system in systems.items():110110+ filename = f"*electron-v{version}-{electron_system}.zip"111111+ if any([x.endswith(filename) for x in hashes]):112112+ out[major_version]["hashes"][nix_system] = [113113+ x.split(" ")[0] for x in hashes if x.endswith(filename)114114+ ][0]115115+ out[major_version]["hashes"]["headers"] = get_headers(version)116116+117117+ return out118118+119119+120120+def get_chromedriver_hashes(major_version: str) -> dict:121121+ """Returns a dictionary of hashes for a given major version"""122122+ m, _ = get_latest_version(major_version)123123+ version: str = m["version"]124124+125125+ out = {}126126+ out[major_version] = {127127+ "hashes": {},128128+ "version": version,129129+ }130130+131131+ hashes: list = get_shasums256(version)132132+133133+ for nix_system, electron_system in systems.items():134134+ filename = f"*chromedriver-v{version}-{electron_system}.zip"135135+ if any([x.endswith(filename) for x in hashes]):136136+ out[major_version]["hashes"][nix_system] = [137137+ x.split(" ")[0] for x in hashes if x.endswith(filename)138138+ ][0]139139+ out[major_version]["hashes"]["headers"] = get_headers(version)140140+141141+ return out142142+143143+144144+def update_binary(major_version: str, commit: bool, chromedriver: bool) -> None:145145+ """Update a given electron-bin or chromedriver release146146+147147+ Args:148148+ major_version: The major version number, e.g. '27'149149+ commit: Whether the updater should commit the result150150+ """151151+ if chromedriver:152152+ json_path=CHROMEDRIVER_INFO_JSON153153+ package_name = f"electron-chromedriver_{major_version}"154154+ update_fn=get_chromedriver_hashes155155+ else:156156+ json_path=BINARY_INFO_JSON157157+ package_name = f"electron_{major_version}-bin"158158+ update_fn = get_electron_hashes159159+ print(f"Updating {package_name}")160160+161161+ old_info = load_info_json(json_path)162162+ new_info = update_fn(major_version)163163+164164+ out = old_info | new_info165165+166166+ save_info_json(json_path, out)167167+168168+ old_version = (169169+ old_info[major_version]["version"] if major_version in old_info else None170170+ )171171+ new_version = new_info[major_version]["version"]172172+ if old_version == new_version:173173+ print(f"{package_name} is up-to-date")174174+ elif commit:175175+ commit_result(package_name, old_version, new_version, json_path)176176+177177+178178+@click.group()179179+def cli() -> None:180180+ """A script for updating electron-bin and chromedriver hashes"""181181+ pass182182+183183+184184+@cli.command("update-chromedriver", help="Update a single major release")185185+@click.option("-v", "--version", help="The major version, e.g. '23'")186186+@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")187187+def update_chromedriver(version: str, commit: bool) -> None:188188+ update_binary(version, commit, True)189189+190190+191191+@cli.command("update", help="Update a single major release")192192+@click.option("-v", "--version", required=True, type=str, help="The major version, e.g. '23'")193193+@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")194194+def update(version: str, commit: bool) -> None:195195+ update_binary(version, commit, False)196196+ update_binary(version, commit, True)197197+198198+199199+@cli.command("update-all", help="Update all releases at once")200200+@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")201201+def update_all(commit: bool) -> None:202202+ # Filter out releases that have reached end-of-life203203+ filtered_bin_info = dict(204204+ filter(205205+ lambda entry: int(entry[0]) in supported_version_range(),206206+ load_info_json(BINARY_INFO_JSON).items(),207207+ )208208+ )209209+210210+ for major_version, _ in filtered_bin_info.items():211211+ update_binary(str(major_version), commit, False)212212+ update_binary(str(major_version), commit, True)213213+214214+215215+if __name__ == "__main__":216216+ cli()
···11#! /usr/bin/env nix-shell22-#! nix-shell -i python -p python3.pkgs.joblib python3.pkgs.click python3.pkgs.click-log nix nix-prefetch-git nurl prefetch-yarn-deps prefetch-npm-deps22+#! nix-shell -i python -p python3.pkgs.joblib python3.pkgs.click python3.pkgs.click-log nix nix-prefetch-git prefetch-yarn-deps prefetch-npm-deps gclient2nix33"""44electron updater5566-A script for updating both binary and source hashes.66+A script for updating electron source hashes.7788It supports the following modes:99···1111|------------- | ----------------------------------------------- |1212| `update` | for updating a specific Electron release |1313| `update-all` | for updating all electron releases at once |1414-| `eval` | just print the necessary sources to fetch |15141616-The `eval` and `update` commands accept an optional `--version` flag1717-to restrict the mechanism only to a given major release.1515+The `update` commands requires a `--version` flag1616+to specify the major release to be updated.1717+The `update-all command updates all non-eol major releases.18181919The `update` and `update-all` commands accept an optional `--commit`2020flag to automatically commit the changes for you.2121-2222-The `update` and `update-all` commands accept optional `--bin-only`2323-and `--source-only` flags to restict the update to binary or source2424-releases.2521"""2622import base642727-import csv2823import json2924import logging3025import os···2833import subprocess2934import sys3035import tempfile3131-import traceback3236import urllib.request3333-3434-from abc import ABC3535-from codecs import iterdecode3636-from datetime import datetime3737-from typing import Iterable, Optional, Tuple3838-from urllib.request import urlopen3939-4037import click4138import click_log42394040+from datetime import datetime4141+from typing import Iterable, Tuple4242+from urllib.request import urlopen4343from joblib import Parallel, delayed, Memory4444-4545-depot_tools_checkout = tempfile.TemporaryDirectory()4646-subprocess.check_call(4747- [4848- "nix-prefetch-git",4949- "--builder",5050- "--quiet",5151- "--url",5252- "https://chromium.googlesource.com/chromium/tools/depot_tools",5353- "--out",5454- depot_tools_checkout.name,5555- "--rev",5656- "452fe3be37f78fbecefa1b4b0d359531bcd70d0d"5757- ]5858-)5959-sys.path.append(depot_tools_checkout.name)6060-6161-import gclient_eval6262-import gclient_utils4444+from update_util import *634564466547# Relative path to the electron-source info.json6648SOURCE_INFO_JSON = "info.json"6767-6868-# Relatice path to the electron-bin info.json6969-BINARY_INFO_JSON = "binary/info.json"7070-7171-# Relative path the the electron-chromedriver info.json7272-CHROMEDRIVER_INFO_JSON = "chromedriver/info.json"7373-7474-# Number of spaces used for each indentation level7575-JSON_INDENT = 476497750os.chdir(os.path.dirname(__file__))7851···4986logger = logging.getLogger(__name__)5087click_log.basic_config(logger)51885252-nixpkgs_path = os.path.dirname(os.path.realpath(__file__)) + "/../../../.."8989+9090+def get_gclient_data(rev: str) -> any:9191+ output = subprocess.check_output(9292+ ["gclient2nix", "generate",9393+ f"https://github.com/electron/electron@{rev}",9494+ "--root", "src/electron"]9595+ )9696+9797+ return json.loads(output)539854995555-class Repo:5656- fetcher: str5757- args: dict5858-5959- def __init__(self) -> None:6060- self.deps: dict = {}6161- self.hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="6262-6363- def get_deps(self, repo_vars: dict, path: str) -> None:6464- print(6565- "evaluating " + json.dumps(self, default=vars, sort_keys=True),6666- file=sys.stderr,6767- )6868-6969- deps_file = self.get_file("DEPS")7070- evaluated = gclient_eval.Parse(deps_file, vars_override=repo_vars, filename="DEPS")7171-7272- repo_vars = dict(evaluated.get("vars", {})) | repo_vars7373-7474- prefix = f"{path}/" if evaluated.get("use_relative_paths", False) else ""7575-7676- self.deps = {7777- prefix + dep_name: repo_from_dep(dep)7878- for dep_name, dep in evaluated.get("deps", {}).items()7979- if (8080- gclient_eval.EvaluateCondition(dep["condition"], repo_vars)8181- if "condition" in dep8282- else True8383- )8484- and repo_from_dep(dep) != None8585- }8686-8787- for key in evaluated.get("recursedeps", []):8888- dep_path = prefix + key8989- if dep_path in self.deps and dep_path != "src/third_party/squirrel.mac":9090- self.deps[dep_path].get_deps(repo_vars, dep_path)9191-9292- def prefetch(self) -> None:9393- self.hash = get_repo_hash(self.fetcher, self.args)9494-9595- def prefetch_all(self) -> int:9696- return sum(9797- [dep.prefetch_all() for [_, dep] in self.deps.items()],9898- [delayed(self.prefetch)()],9999- )100100-101101- def flatten_repr(self) -> dict:102102- return {"fetcher": self.fetcher, "hash": self.hash, **self.args}103103-104104- def flatten(self, path: str) -> dict:105105- out = {path: self.flatten_repr()}106106- for dep_path, dep in self.deps.items():107107- out |= dep.flatten(dep_path)108108- return out109109-110110- def get_file(self, filepath: str) -> str:111111- raise NotImplementedError112112-113113-114114-class GitRepo(Repo):115115- def __init__(self, url: str, rev: str) -> None:116116- super().__init__()117117- self.fetcher = "fetchgit"118118- self.args = {119119- "url": url,120120- "rev": rev,121121- }122122-123123-124124-class GitHubRepo(Repo):125125- def __init__(self, owner: str, repo: str, rev: str) -> None:126126- super().__init__()127127- self.fetcher = "fetchFromGitHub"128128- self.args = {129129- "owner": owner,130130- "repo": repo,131131- "rev": rev,132132- }133133-134134- def get_file(self, filepath: str) -> str:135135- return (136136- urlopen(137137- f"https://raw.githubusercontent.com/{self.args['owner']}/{self.args['repo']}/{self.args['rev']}/{filepath}"138138- )139139- .read()140140- .decode("utf-8")141141- )142142-143143-144144-class GitilesRepo(Repo):145145- def __init__(self, url: str, rev: str) -> None:146146- super().__init__()147147- self.fetcher = "fetchFromGitiles"148148- self.args = {149149- "url": url,150150- "rev": rev,151151- }152152-153153- if url == "https://chromium.googlesource.com/chromium/src.git":154154- self.args["postFetch"] = "rm -r $out/third_party/blink/web_tests; "155155- self.args["postFetch"] += "rm -rf $out/third_party/hunspell/tests; "156156- self.args["postFetch"] += "rm -r $out/content/test/data; "157157- self.args["postFetch"] += "rm -rf $out/courgette/testdata; "158158- self.args["postFetch"] += "rm -r $out/extensions/test/data; "159159- self.args["postFetch"] += "rm -r $out/media/test/data; "160160-161161- def get_file(self, filepath: str) -> str:162162- return base64.b64decode(163163- urlopen(164164- f"{self.args['url']}/+/{self.args['rev']}/{filepath}?format=TEXT"165165- ).read()100100+def get_chromium_file(chromium_rev: str, filepath: str) -> str:101101+ return base64.b64decode(102102+ urlopen(103103+ f"https://chromium.googlesource.com/chromium/src.git/+/{chromium_rev}/{filepath}?format=TEXT"104104+ ).read()166105 ).decode("utf-8")167106168107169169-class ElectronBinRepo(GitHubRepo):170170- def __init__(self, owner: str, repo: str, rev: str) -> None:171171- super().__init__(owner, repo, rev)172172- self.systems = {173173- "i686-linux": "linux-ia32",174174- "x86_64-linux": "linux-x64",175175- "armv7l-linux": "linux-armv7l",176176- "aarch64-linux": "linux-arm64",177177- "x86_64-darwin": "darwin-x64",178178- "aarch64-darwin": "darwin-arm64",179179- }180180-181181- def get_shasums256(self, version: str) -> list:182182- """Returns the contents of SHASUMS256.txt"""183183- try:184184- called_process: subprocess.CompletedProcess = subprocess.run(185185- [186186- "nix-prefetch-url",187187- "--print-path",188188- f"https://github.com/electron/electron/releases/download/v{version}/SHASUMS256.txt",189189- ],190190- capture_output=True,191191- check=True,192192- text=True,193193- )194194-195195- hash_file_path = called_process.stdout.split("\n")[1]196196-197197- with open(hash_file_path, "r") as f:198198- return f.read().split("\n")199199-200200- except subprocess.CalledProcessError as err:201201- print(err.stderr)202202- sys.exit(1)203203-204204- def get_headers(self, version: str) -> str:205205- """Returns the hash of the release headers tarball"""206206- try:207207- called_process: subprocess.CompletedProcess = subprocess.run(208208- [209209- "nix-prefetch-url",210210- f"https://artifacts.electronjs.org/headers/dist/v{version}/node-v{version}-headers.tar.gz",211211- ],212212- capture_output=True,213213- check=True,214214- text=True,215215- )216216- return called_process.stdout.split("\n")[0]217217- except subprocess.CalledProcessError as err:218218- print(err.stderr)219219- sys.exit(1)220220-221221- def get_hashes(self, major_version: str) -> dict:222222- """Returns a dictionary of hashes for a given major version"""223223- m, _ = get_latest_version(major_version)224224- version: str = m["version"]225225-226226- out = {}227227- out[major_version] = {228228- "hashes": {},229229- "version": version,230230- }231231-232232- hashes: list = self.get_shasums256(version)233233-234234- for nix_system, electron_system in self.systems.items():235235- filename = f"*electron-v{version}-{electron_system}.zip"236236- if any([x.endswith(filename) for x in hashes]):237237- out[major_version]["hashes"][nix_system] = [238238- x.split(" ")[0] for x in hashes if x.endswith(filename)239239- ][0]240240- out[major_version]["hashes"]["headers"] = self.get_headers(version)241241-242242- return out243243-244244-245245-class ElectronChromedriverRepo(ElectronBinRepo):246246- def __init__(self, rev: str) -> None:247247- super().__init__("electron", "electron", rev)248248- self.systems = {249249- "i686-linux": "linux-ia32",250250- "x86_64-linux": "linux-x64",251251- "armv7l-linux": "linux-armv7l",252252- "aarch64-linux": "linux-arm64",253253- "x86_64-darwin": "darwin-x64",254254- "aarch64-darwin": "darwin-arm64",255255- }256256-257257- def get_hashes(self, major_version: str) -> dict:258258- """Returns a dictionary of hashes for a given major version"""259259- m, _ = get_latest_version(major_version)260260- version: str = m["version"]261261-262262- out = {}263263- out[major_version] = {264264- "hashes": {},265265- "version": version,266266- }267267-268268- hashes: list = self.get_shasums256(version)269269-270270- for nix_system, electron_system in self.systems.items():271271- filename = f"*chromedriver-v{version}-{electron_system}.zip"272272- if any([x.endswith(filename) for x in hashes]):273273- out[major_version]["hashes"][nix_system] = [274274- x.split(" ")[0] for x in hashes if x.endswith(filename)275275- ][0]276276- out[major_version]["hashes"]["headers"] = self.get_headers(version)277277-278278- return out279279-280280-281281-# Releases that have reached end-of-life no longer receive any updates282282-# and it is rather pointless trying to update those.283283-#284284-# https://endoflife.date/electron285285-def supported_version_range() -> range:286286- """Returns a range of electron releases that have not reached end-of-life yet"""287287- releases_json = json.loads(288288- urlopen("https://endoflife.date/api/electron.json").read()289289- )290290- supported_releases = [291291- int(x["cycle"])292292- for x in releases_json293293- if x["eol"] == False294294- or datetime.strptime(x["eol"], "%Y-%m-%d") > datetime.today()295295- ]296296-297297- return range(298298- min(supported_releases), # incl.299299- # We have also packaged the beta release in nixpkgs,300300- # but it is not tracked by endoflife.date301301- max(supported_releases) + 2, # excl.302302- 1,108108+def get_electron_file(electron_rev: str, filepath: str) -> str:109109+ return (110110+ urlopen(111111+ f"https://raw.githubusercontent.com/electron/electron/{electron_rev}/{filepath}"112112+ )113113+ .read()114114+ .decode("utf-8")303115 )304116305117306118@memory.cache307307-def get_repo_hash(fetcher: str, args: dict) -> str:308308- expr = f"with import {nixpkgs_path} {{}};{fetcher}{{"309309- for key, val in args.items():310310- expr += f'{key}="{val}";'311311- expr += "}"312312- cmd = ["nurl", "-H", "--expr", expr]313313- print(" ".join(cmd), file=sys.stderr)314314- out = subprocess.check_output(cmd)315315- return out.decode("utf-8").strip()316316-317317-318318-@memory.cache319319-def _get_yarn_hash(path: str) -> str:320320- print(f"prefetch-yarn-deps", file=sys.stderr)321321- with tempfile.TemporaryDirectory() as tmp_dir:322322- with open(tmp_dir + "/yarn.lock", "w") as f:323323- f.write(path)324324- return (325325- subprocess.check_output(["prefetch-yarn-deps", tmp_dir + "/yarn.lock"])326326- .decode("utf-8")327327- .strip()328328- )329329-330330-331331-def get_yarn_hash(repo: Repo, yarn_lock_path: str = "yarn.lock") -> str:332332- return _get_yarn_hash(repo.get_file(yarn_lock_path))333333-334334-335335-@memory.cache336336-def _get_npm_hash(filename: str) -> str:337337- print(f"prefetch-npm-deps", file=sys.stderr)338338- with tempfile.TemporaryDirectory() as tmp_dir:339339- with open(tmp_dir + "/package-lock.json", "w") as f:340340- f.write(filename)341341- return (342342- subprocess.check_output(343343- ["prefetch-npm-deps", tmp_dir + "/package-lock.json"]344344- )345345- .decode("utf-8")346346- .strip()347347- )348348-349349-350350-def get_npm_hash(repo: Repo, package_lock_path: str = "package-lock.json") -> str:351351- return _get_npm_hash(repo.get_file(package_lock_path))352352-353353-354354-def repo_from_dep(dep: dict) -> Optional[Repo]:355355- if "url" in dep:356356- url, rev = gclient_utils.SplitUrlRevision(dep["url"])357357-358358- search_object = re.search(r"https://github.com/(.+)/(.+?)(\.git)?$", url)359359- if search_object:360360- return GitHubRepo(search_object.group(1), search_object.group(2), rev)361361-362362- if re.match(r"https://.+\.googlesource.com", url):363363- return GitilesRepo(url, rev)364364-365365- return GitRepo(url, rev)366366- else:367367- # Not a git dependency; skip368368- return None369369-370370-371371-def get_gn_source(repo: Repo) -> dict:119119+def get_chromium_gn_source(chromium_rev: str) -> dict:372120 gn_pattern = r"'gn_version': 'git_revision:([0-9a-f]{40})'"373373- gn_commit = re.search(gn_pattern, repo.get_file("DEPS")).group(1)121121+ gn_commit = re.search(gn_pattern, get_chromium_file(chromium_rev, "DEPS")).group(1)374122 gn_prefetch: bytes = subprocess.check_output(375123 [376124 "nix-prefetch-git",···101427 }102428 }103429430430+@memory.cache431431+def get_electron_yarn_hash(electron_rev: str) -> str:432432+ print(f"prefetch-yarn-deps", file=sys.stderr)433433+ with tempfile.TemporaryDirectory() as tmp_dir:434434+ with open(tmp_dir + "/yarn.lock", "w") as f:435435+ f.write(get_electron_file(electron_rev, "yarn.lock"))436436+ return (437437+ subprocess.check_output(["prefetch-yarn-deps", tmp_dir + "/yarn.lock"])438438+ .decode("utf-8")439439+ .strip()440440+ )104441105105-def get_latest_version(major_version: str) -> Tuple[str, str]:106106- """Returns the latest version for a given major version"""107107- electron_releases: dict = json.loads(108108- urlopen("https://releases.electronjs.org/releases.json").read()109109- )110110- major_version_releases = filter(111111- lambda item: item["version"].startswith(f"{major_version}."), electron_releases112112- )113113- m = max(major_version_releases, key=lambda item: item["date"])114114-115115- rev = f"v{m['version']}"116116- return (m, rev)117117-118118-119119-def get_electron_bin_info(major_version: str) -> Tuple[str, str, ElectronBinRepo]:120120- m, rev = get_latest_version(major_version)121121-122122- electron_repo: ElectronBinRepo = ElectronBinRepo("electron", "electron", rev)123123- return (major_version, m, electron_repo)124124-125125-126126-def get_electron_chromedriver_info(127127- major_version: str,128128-) -> Tuple[str, str, ElectronChromedriverRepo]:129129- m, rev = get_latest_version(major_version)130130-131131- electron_repo: ElectronChromedriverRepo = ElectronChromedriverRepo(rev)132132- return (major_version, m, electron_repo)442442+@memory.cache443443+def get_chromium_npm_hash(chromium_rev: str) -> str:444444+ print(f"prefetch-npm-deps", file=sys.stderr)445445+ with tempfile.TemporaryDirectory() as tmp_dir:446446+ with open(tmp_dir + "/package-lock.json", "w") as f:447447+ f.write(get_chromium_file(chromium_rev, "third_party/node/package-lock.json"))448448+ return (449449+ subprocess.check_output(450450+ ["prefetch-npm-deps", tmp_dir + "/package-lock.json"]451451+ )452452+ .decode("utf-8")453453+ .strip()454454+ )133455134456135135-def get_electron_info(major_version: str) -> Tuple[str, str, GitHubRepo]:136136- m, rev = get_latest_version(major_version)457457+def get_update(major_version: str, m: str, gclient_data: any) -> Tuple[str, dict]:137458138138- electron_repo: GitHubRepo = GitHubRepo("electron", "electron", rev)139139- electron_repo.get_deps(140140- {141141- **{142142- f"checkout_{platform}": platform == "linux" or platform == "x64" or platform == "arm64" or platform == "arm"143143- for platform in ["ios", "chromeos", "android", "mac", "win", "linux"]144144- },145145- **{146146- f"checkout_{arch}": True147147- for arch in ["x64", "arm64", "arm", "x86", "mips", "mips64", "ppc"]148148- },149149- },150150- "src/electron",151151- )152152-153153- return (major_version, m, electron_repo)154154-155155-156156-def get_update(repo: Tuple[str, str, Repo]) -> Tuple[str, dict]:157157- (major_version, m, electron_repo) = repo158158-159159- tasks = electron_repo.prefetch_all()160160- a = lambda: (("electron_yarn_hash", get_yarn_hash(electron_repo)))459459+ tasks = []460460+ a = lambda: (("electron_yarn_hash", get_electron_yarn_hash(gclient_data["src/electron"]["args"]["rev"])))161461 tasks.append(delayed(a)())162462 a = lambda: (163463 (164464 "chromium_npm_hash",165165- get_npm_hash(166166- electron_repo.deps["src"], "third_party/node/package-lock.json"167167- ),465465+ get_chromium_npm_hash(gclient_data["src"]["args"]["rev"]),168466 )169467 )170468 tasks.append(delayed(a)())···148502 if n != None149503 }150504151151- tree = electron_repo.flatten("src/electron")152152-153505 return (154506 f"{major_version}",155507 {156156- "deps": tree,508508+ "deps": gclient_data,157509 **{key: m[key] for key in ["version", "modules", "chrome", "node"]},158510 "chromium": {159511 "version": m["chrome"],160160- "deps": get_gn_source(electron_repo.deps["src"]),512512+ "deps": get_chromium_gn_source(gclient_data["src"]["args"]["rev"]),161513 },162514 **task_results,163515 },164516 )165165-166166-167167-def load_info_json(path: str) -> dict:168168- """Load the contents of a JSON file169169-170170- Args:171171- path: The path to the JSON file172172-173173- Returns: An empty dict if the path does not exist, otherwise the contents of the JSON file.174174- """175175- try:176176- with open(path, "r") as f:177177- return json.loads(f.read())178178- except:179179- return {}180180-181181-182182-def save_info_json(path: str, content: dict) -> None:183183- """Saves the given info to a JSON file184184-185185- Args:186186- path: The path where the info should be saved187187- content: The content to be saved as JSON.188188- """189189- with open(path, "w") as f:190190- f.write(json.dumps(content, indent=JSON_INDENT, default=vars, sort_keys=True))191191- f.write("\n")192192-193193-194194-def update_bin(major_version: str, commit: bool) -> None:195195- """Update a given electron-bin release196196-197197- Args:198198- major_version: The major version number, e.g. '27'199199- commit: Whether the updater should commit the result200200- """201201- package_name = f"electron_{major_version}-bin"202202- print(f"Updating {package_name}")203203-204204- electron_bin_info = get_electron_bin_info(major_version)205205- (_major_version, _version, repo) = electron_bin_info206206-207207- old_info = load_info_json(BINARY_INFO_JSON)208208- new_info = repo.get_hashes(major_version)209209-210210- out = old_info | new_info211211-212212- save_info_json(BINARY_INFO_JSON, out)213213-214214- old_version = (215215- old_info[major_version]["version"] if major_version in old_info else None216216- )217217- new_version = new_info[major_version]["version"]218218- if old_version == new_version:219219- print(f"{package_name} is up-to-date")220220- elif commit:221221- commit_result(package_name, old_version, new_version, BINARY_INFO_JSON)222222-223223-224224-def update_chromedriver(major_version: str, commit: bool) -> None:225225- """Update a given electron-chromedriver release226226-227227- Args:228228- major_version: The major version number, e.g. '27'229229- commit: Whether the updater should commit the result230230- """231231- package_name = f"electron-chromedriver_{major_version}"232232- print(f"Updating {package_name}")233233-234234- electron_chromedriver_info = get_electron_chromedriver_info(major_version)235235- (_major_version, _version, repo) = electron_chromedriver_info236236-237237- old_info = load_info_json(CHROMEDRIVER_INFO_JSON)238238- new_info = repo.get_hashes(major_version)239239-240240- out = old_info | new_info241241-242242- save_info_json(CHROMEDRIVER_INFO_JSON, out)243243-244244- old_version = (245245- old_info[major_version]["version"] if major_version in old_info else None246246- )247247- new_version = new_info[major_version]["version"]248248- if old_version == new_version:249249- print(f"{package_name} is up-to-date")250250- elif commit:251251- commit_result(package_name, old_version, new_version, CHROMEDRIVER_INFO_JSON)252252-253253-254254-def update_source(major_version: str, commit: bool) -> None:255255- """Update a given electron-source release256256-257257- Args:258258- major_version: The major version number, e.g. '27'259259- commit: Whether the updater should commit the result260260- """261261- package_name = f"electron-source.electron_{major_version}"262262- print(f"Updating electron-source.electron_{major_version}")263263-264264- old_info = load_info_json(SOURCE_INFO_JSON)265265- old_version = (266266- old_info[str(major_version)]["version"]267267- if str(major_version) in old_info268268- else None269269- )270270-271271- electron_source_info = get_electron_info(major_version)272272- new_info = get_update(electron_source_info)273273- out = old_info | {new_info[0]: new_info[1]}274274-275275- save_info_json(SOURCE_INFO_JSON, out)276276-277277- new_version = new_info[1]["version"]278278- if old_version == new_version:279279- print(f"{package_name} is up-to-date")280280- elif commit:281281- commit_result(package_name, old_version, new_version, SOURCE_INFO_JSON)282517283518284519def non_eol_releases(releases: Iterable[int]) -> Iterable[int]:···167640 return tuple(filter(lambda x: x in supported_version_range(), releases))168641169642170170-def update_all_source(commit: bool) -> None:643643+def update_source(version: str, commit: bool) -> None:644644+ """Update a given electron-source release645645+646646+ Args:647647+ version: The major version number, e.g. '27'648648+ commit: Whether the updater should commit the result649649+ """650650+ major_version = version651651+652652+ package_name = f"electron-source.electron_{major_version}"653653+ print(f"Updating electron-source.electron_{major_version}")654654+655655+ old_info = load_info_json(SOURCE_INFO_JSON)656656+ old_version = (657657+ old_info[major_version]["version"]658658+ if major_version in old_info659659+ else None660660+ )661661+662662+ m, rev = get_latest_version(major_version)663663+ if old_version == m["version"]:664664+ print(f"{package_name} is up-to-date")665665+ return666666+667667+ gclient_data = get_gclient_data(rev)668668+ new_info = get_update(major_version, m, gclient_data)669669+ out = old_info | {new_info[0]: new_info[1]}670670+671671+ save_info_json(SOURCE_INFO_JSON, out)672672+673673+ new_version = new_info[1]["version"]674674+ if commit:675675+ commit_result(package_name, old_version, new_version, SOURCE_INFO_JSON)676676+677677+678678+@click.group()679679+def cli() -> None:680680+ """A script for updating electron-source hashes"""681681+ pass682682+683683+684684+@cli.command("update", help="Update a single major release")685685+@click.option("-v", "--version", required=True, type=str, help="The major version, e.g. '23'")686686+@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")687687+def update(version: str, commit: bool) -> None:688688+ update_source(version, commit)689689+690690+691691+@cli.command("update-all", help="Update all releases at once")692692+@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")693693+def update_all(commit: bool) -> None:171694 """Update all eletron-source releases at once172695173696 Args:···227650228651 filtered_releases = non_eol_releases(tuple(map(lambda x: int(x), old_info.keys())))229652230230- # This might take some time231231- repos = Parallel(n_jobs=2, require="sharedmem")(232232- delayed(get_electron_info)(major_version) for major_version in filtered_releases233233- )234234- new_info = {235235- n[0]: n[1]236236- for n in Parallel(n_jobs=2, require="sharedmem")(237237- delayed(get_update)(repo) for repo in repos238238- )239239- }240240-241241- if commit:242242- for major_version in filtered_releases:243243- # Since the sources have been fetched at this point already,244244- # fetching them again will be much faster.245245- update_source(str(major_version), commit)246246- else:247247- out = old_info | {new_info[0]: new_info[1]}248248- save_info_json(SOURCE_INFO_JSON, out)249249-250250-251251-def parse_cve_numbers(tag_name: str) -> Iterable[str]:252252- """Returns mentioned CVE numbers from a given release tag"""253253- cve_pattern = r"CVE-\d{4}-\d+"254254- url = f"https://api.github.com/repos/electron/electron/releases/tags/{tag_name}"255255- headers = {256256- "Accept": "application/vnd.github+json",257257- "X-GitHub-Api-Version": "2022-11-28",258258- }259259- request = urllib.request.Request(url=url, headers=headers)260260- release_note = ""261261- try:262262- with urlopen(request) as response:263263- release_note = json.loads(response.read().decode("utf-8"))["body"]264264- except:265265- print(266266- f"WARN: Fetching release note for {tag_name} from GitHub failed!",267267- file=sys.stderr,268268- )269269-270270- return sorted(re.findall(cve_pattern, release_note))271271-272272-273273-def commit_result(274274- package_name: str, old_version: Optional[str], new_version: str, path: str275275-) -> None:276276- """Creates a git commit with a short description of the change277277-278278- Args:279279- package_name: The package name, e.g. `electron-source.electron-{major_version}`280280- or `electron_{major_version}-bin`281281-282282- old_version: Version number before the update.283283- Can be left empty when initializing a new release.284284-285285- new_version: Version number after the update.286286-287287- path: Path to the lockfile to be committed288288- """289289- assert (290290- isinstance(package_name, str) and len(package_name) > 0291291- ), "Argument `package_name` cannot be empty"292292- assert (293293- isinstance(new_version, str) and len(new_version) > 0294294- ), "Argument `new_version` cannot be empty"295295-296296- if old_version != new_version:297297- major_version = new_version.split(".")[0]298298- cve_fixes_text = "\n".join(299299- list(300300- map(lambda cve: f"- Fixes {cve}", parse_cve_numbers(f"v{new_version}"))301301- )302302- )303303- init_msg = f"init at {new_version}"304304- update_msg = f"{old_version} -> {new_version}"305305- diff = (306306- f"- Diff: https://github.com/electron/electron/compare/refs/tags/v{old_version}...v{new_version}\n"307307- if old_version != None308308- else ""309309- )310310- commit_message = f"""{package_name}: {update_msg if old_version != None else init_msg}311311-312312-- Changelog: https://github.com/electron/electron/releases/tag/v{new_version}313313-{diff}{cve_fixes_text}314314-"""315315- subprocess.run(316316- [317317- "git",318318- "add",319319- path,320320- ]321321- )322322- subprocess.run(323323- [324324- "git",325325- "commit",326326- "-m",327327- commit_message,328328- ]329329- )330330-331331-332332-@click.group()333333-def cli() -> None:334334- """A script for updating electron-bin and electron-source hashes"""335335- pass336336-337337-338338-@cli.command(339339- "eval", help="Print the necessary sources to fetch for a given major release"340340-)341341-@click.option("--version", help="The major version, e.g. '23'")342342-def eval(version):343343- (_, _, repo) = electron_repo = get_electron_info(version)344344- tree = repo.flatten("src/electron")345345- print(json.dumps(tree, indent=JSON_INDENT, default=vars, sort_keys=True))346346-347347-348348-@cli.command("update-chromedriver", help="Update a single major release")349349-@click.option("-v", "--version", help="The major version, e.g. '23'")350350-@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")351351-def update_chromedriver_cmd(version: str, commit: bool) -> None:352352- update_chromedriver(version, commit)353353-354354-355355-@cli.command("update", help="Update a single major release")356356-@click.option("-v", "--version", help="The major version, e.g. '23'")357357-@click.option(358358- "-b",359359- "--bin-only",360360- is_flag=True,361361- default=False,362362- help="Only update electron-bin packages",363363-)364364-@click.option(365365- "-s",366366- "--source-only",367367- is_flag=True,368368- default=False,369369- help="Only update electron-source packages",370370-)371371-@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")372372-def update(version: str, bin_only: bool, source_only: bool, commit: bool) -> None:373373- assert isinstance(version, str) and len(version) > 0, "version must be non-empty"374374-375375- if bin_only and source_only:376376- print(377377- "Error: Omit --bin-only and --source-only if you want to update both source and binary packages.",378378- file=sys.stderr,379379- )380380- sys.exit(1)381381-382382- elif bin_only:383383- update_bin(version, commit)384384-385385- elif source_only:386386- update_source(version, commit)387387-388388- else:389389- update_bin(version, commit)390390- update_source(version, commit)391391-392392- update_chromedriver(version, commit)393393-394394-395395-@cli.command("update-all", help="Update all releases at once")396396-@click.option(397397- "-b",398398- "--bin-only",399399- is_flag=True,400400- default=False,401401- help="Only update electron-bin packages",402402-)403403-@click.option(404404- "-s",405405- "--source-only",406406- is_flag=True,407407- default=False,408408- help="Only update electron-source packages",409409-)410410-@click.option("-c", "--commit", is_flag=True, default=False, help="Commit the result")411411-def update_all(bin_only: bool, source_only: bool, commit: bool) -> None:412412- # Filter out releases that have reached end-of-life413413- filtered_bin_info = dict(414414- filter(415415- lambda entry: int(entry[0]) in supported_version_range(),416416- load_info_json(BINARY_INFO_JSON).items(),417417- )418418- )419419-420420- if bin_only and source_only:421421- print(422422- "Error: omit --bin-only and --source-only if you want to update both source and binary packages.",423423- file=sys.stderr,424424- )425425- sys.exit(1)426426-427427- elif bin_only:428428- for major_version, _ in filtered_bin_info.items():429429- update_bin(major_version, commit)430430-431431- elif source_only:432432- update_all_source(commit)433433-434434- else:435435- for major_version, _ in filtered_bin_info.items():436436- update_bin(major_version, commit)437437-438438- update_all_source(commit)439439-440440- for major_version, _ in filtered_bin_info.items():441441- update_chromedriver(major_version, commit)653653+ for major_version in filtered_releases:654654+ update_source(str(major_version), commit)442655443656444657if __name__ == "__main__":
+161
pkgs/development/tools/electron/update_util.py
···11+import json22+import re33+import sys44+import subprocess55+import urllib.request66+77+from typing import Iterable, Optional, Tuple88+from urllib.request import urlopen99+from datetime import datetime1010+1111+# Number of spaces used for each indentation level1212+JSON_INDENT = 41313+1414+releases_json = None1515+1616+# Releases that have reached end-of-life no longer receive any updates1717+# and it is rather pointless trying to update those.1818+#1919+# https://endoflife.date/electron2020+def supported_version_range() -> range:2121+ """Returns a range of electron releases that have not reached end-of-life yet"""2222+ global releases_json2323+ if releases_json is None:2424+ releases_json = json.loads(2525+ urlopen("https://endoflife.date/api/electron.json").read()2626+ )2727+ supported_releases = [2828+ int(x["cycle"])2929+ for x in releases_json3030+ if x["eol"] == False3131+ or datetime.strptime(x["eol"], "%Y-%m-%d") > datetime.today()3232+ ]3333+3434+ return range(3535+ min(supported_releases), # incl.3636+ # We have also packaged the beta release in nixpkgs,3737+ # but it is not tracked by endoflife.date3838+ max(supported_releases) + 2, # excl.3939+ 1,4040+ )4141+4242+def get_latest_version(major_version: str) -> Tuple[str, str]:4343+ """Returns the latest version for a given major version"""4444+ electron_releases: dict = json.loads(4545+ urlopen("https://releases.electronjs.org/releases.json").read()4646+ )4747+ major_version_releases = filter(4848+ lambda item: item["version"].startswith(f"{major_version}."), electron_releases4949+ )5050+ m = max(major_version_releases, key=lambda item: item["date"])5151+5252+ rev = f"v{m['version']}"5353+ return (m, rev)5454+5555+5656+def load_info_json(path: str) -> dict:5757+ """Load the contents of a JSON file5858+5959+ Args:6060+ path: The path to the JSON file6161+6262+ Returns: An empty dict if the path does not exist, otherwise the contents of the JSON file.6363+ """6464+ try:6565+ with open(path, "r") as f:6666+ return json.loads(f.read())6767+ except:6868+ return {}6969+7070+7171+def save_info_json(path: str, content: dict) -> None:7272+ """Saves the given info to a JSON file7373+7474+ Args:7575+ path: The path where the info should be saved7676+ content: The content to be saved as JSON.7777+ """7878+ with open(path, "w") as f:7979+ f.write(json.dumps(content, indent=JSON_INDENT, default=vars, sort_keys=True))8080+ f.write("\n")8181+8282+8383+def parse_cve_numbers(tag_name: str) -> Iterable[str]:8484+ """Returns mentioned CVE numbers from a given release tag"""8585+ cve_pattern = r"CVE-\d{4}-\d+"8686+ url = f"https://api.github.com/repos/electron/electron/releases/tags/{tag_name}"8787+ headers = {8888+ "Accept": "application/vnd.github+json",8989+ "X-GitHub-Api-Version": "2022-11-28",9090+ }9191+ request = urllib.request.Request(url=url, headers=headers)9292+ release_note = ""9393+ try:9494+ with urlopen(request) as response:9595+ release_note = json.loads(response.read().decode("utf-8"))["body"]9696+ except:9797+ print(9898+ f"WARN: Fetching release note for {tag_name} from GitHub failed!",9999+ file=sys.stderr,100100+ )101101+102102+ return sorted(re.findall(cve_pattern, release_note))103103+104104+105105+def commit_result(106106+ package_name: str, old_version: Optional[str], new_version: str, path: str107107+) -> None:108108+ """Creates a git commit with a short description of the change109109+110110+ Args:111111+ package_name: The package name, e.g. `electron-source.electron-{major_version}`112112+ or `electron_{major_version}-bin`113113+114114+ old_version: Version number before the update.115115+ Can be left empty when initializing a new release.116116+117117+ new_version: Version number after the update.118118+119119+ path: Path to the lockfile to be committed120120+ """121121+ assert (122122+ isinstance(package_name, str) and len(package_name) > 0123123+ ), "Argument `package_name` cannot be empty"124124+ assert (125125+ isinstance(new_version, str) and len(new_version) > 0126126+ ), "Argument `new_version` cannot be empty"127127+128128+ if old_version != new_version:129129+ major_version = new_version.split(".")[0]130130+ cve_fixes_text = "\n".join(131131+ list(132132+ map(lambda cve: f"- Fixes {cve}", parse_cve_numbers(f"v{new_version}"))133133+ )134134+ )135135+ init_msg = f"init at {new_version}"136136+ update_msg = f"{old_version} -> {new_version}"137137+ diff = (138138+ f"- Diff: https://github.com/electron/electron/compare/refs/tags/v{old_version}...v{new_version}\n"139139+ if old_version != None140140+ else ""141141+ )142142+ commit_message = f"""{package_name}: {update_msg if old_version != None else init_msg}143143+144144+- Changelog: https://github.com/electron/electron/releases/tag/v{new_version}145145+{diff}{cve_fixes_text}146146+"""147147+ subprocess.run(148148+ [149149+ "git",150150+ "add",151151+ path,152152+ ]153153+ )154154+ subprocess.run(155155+ [156156+ "git",157157+ "commit",158158+ "-m",159159+ commit_message,160160+ ]161161+ )
···11-commit 36d486cc2ecdb9c290dba65bd5668b7e50d0d82222-Author: Dimitry Andric <dim@FreeBSD.org>33-Date: Wed Jul 31 11:43:50 2024 +020044-55- Fix enum warning in ath_hal's ar900266-77- This fixes a clang 19 warning:88-99- sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c:57:32: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_ANT_SETTING') [-Werror,-Wenum-compare]1010- 57 | (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) {1111- | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~1212-1313- The `ah_diversity` field of `struct ath_hal_5212` is of type `HAL_BOOL`,1414- not the enum type `HAL_ANT_SETTING`. In other code, `ah_diversity` is1515- set to `AH_TRUE` whenever the related field `ah_antControl` is set to1616- `HAL_ANT_VARIABLE`.1717-1818- It is not entirely clear to me what the intended statement is here: the1919- test as it is written now compares the enum value 0 to `ah_diversity`,2020- so in effect it enables the following block whenever `ah_diversity` is2121- `AH_TRUE`. Write it like that, to avoid the compiler warning.2222-2323- MFC after: 3 days2424-2525-diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c b/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c2626-index 01a224cbbfe9..fb2700771ffa 1006442727---- a/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c2828-+++ b/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c2929-@@ -54,7 +54,7 @@ ar9285BTCoexAntennaDiversity(struct ath_hal *ah)3030- !! (ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE));3131-3232- if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) ||3333-- (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) {3434-+ (AH5212(ah)->ah_diversity == AH_TRUE)) {3535- if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) &&3636- (AH5212(ah)->ah_antControl == HAL_ANT_VARIABLE)) {3737- /* Enable antenna diversity */3838-commit 82246ac5d890e031c9978052e5a431e0960182d53939-Author: Dimitry Andric <dim@FreeBSD.org>4040-Date: Wed Jul 31 11:37:20 2024 +02004141-4242- Fix enum warnings in ath_hal's ar93004343-4444- This fixes a number of clang 19 warnings:4545-4646- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:709:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]4747- 709 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);4848- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4949- sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'5050- 148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))5151- | ~~~ ^ ~~~~~~~~~~~~~~~~~~5252- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:745:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]5353- 745 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);5454- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5555- sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'5656- 148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))5757- | ~~~ ^ ~~~~~~~~~~~~~~~~~~5858- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:781:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]5959- 781 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);6060- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6161- sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'6262- 148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))6363- | ~~~ ^ ~~~~~~~~~~~~~~~~~~6464-6565- The `FBIN2FREQ()` and `FREQ2FBIN()` macros in `ar9300eep.h` are invoked6666- in most places around the `ath_hal` code with a (effectively) boolean6767- second argument, corresponding to "is this 2GHz?". But in the code that6868- is warned about, the value `HAL_FREQ_BAND_2GHZ` is of a different6969- non-boolean type, `HAL_FREQ_BAND`.7070-7171- Update the `FBIN2FREQ()` and `FREQ2FBIN()` macros to interpret the7272- second argument as boolean value, and rename the macro parameter names7373- to better describe their meaning.7474-7575- Reviewed by: adrian, bz7676- MFC after: 3 days7777- Differential Revision: https://reviews.freebsd.org/D462017878-7979-diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h8080-index 9230fd57e2e4..b2a0862c7aee 1006448181---- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h8282-+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h8383-@@ -142,10 +142,10 @@ enum Ar9300EepromTemplate8484- #define OSPREY_EEPMISC_WOW 0x028585- #define OSPREY_CUSTOMER_DATA_SIZE 208686-8787--#define FREQ2FBIN(x,y) \8888-- (u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))8989--#define FBIN2FREQ(x,y) \9090-- (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))9191-+#define FREQ2FBIN(freq,is_2ghz) \9292-+ (u_int8_t)((is_2ghz) ? ((freq) - 2300) : (((freq) - 4800) / 5))9393-+#define FBIN2FREQ(freq,is_2ghz) \9494-+ ((is_2ghz) ? (2300 + freq) : (4800 + 5 * freq))9595- #define OSPREY_MAX_CHAINS 39696- #define OSPREY_ANT_16S 259797- #define OSPREY_FUTURE_MODAL_SZ 69898-commit 1bd66fac35ec27fa64d6158f82fdcbdc260986799999-Author: Dimitry Andric <dim@FreeBSD.org>100100-Date: Wed Jul 31 13:14:17 2024 +0200101101-102102- Fix enum warning in isci103103-104104- This fixes a clang 19 warning:105105-106106- sys/dev/isci/scil/scif_sas_smp_remote_device.c:197:26: error: comparison of different enumeration types ('SCI_IO_STATUS' (aka 'enum _SCI_IO_STATUS') and 'enum _SCI_STATUS') [-Werror,-Wenum-compare]107107- 197 | if (completion_status == SCI_FAILURE_RETRY_REQUIRED)108108- | ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~109109-110110- The `completion_status` variable is of type `SCI_IO_STATUS`, not111111- `SCI_STATUS`. In this case, we can seamlessly replace the value with112112- `SCI_IO_FAILURE_RETRY_REQUIRED`, which is numerically equal to113113- `SCI_FAILURE_RETRY_REQUIRED`.114114-115115- MFC after: 3 days116116-117117-diff --git a/sys/dev/isci/scil/scif_sas_smp_remote_device.c b/sys/dev/isci/scil/scif_sas_smp_remote_device.c118118-index d6055adc13f9..c72402f66889 100644119119---- a/sys/dev/isci/scil/scif_sas_smp_remote_device.c120120-+++ b/sys/dev/isci/scil/scif_sas_smp_remote_device.c121121-@@ -194,7 +194,7 @@ SCI_STATUS scif_sas_smp_remote_device_decode_smp_response(122122-123123- //if Core set the status of this io to be RETRY_REQUIRED, we should124124- //retry the IO without even decode the response.125125-- if (completion_status == SCI_FAILURE_RETRY_REQUIRED)126126-+ if (completion_status == SCI_IO_FAILURE_RETRY_REQUIRED)127127- {128128- scif_sas_smp_remote_device_continue_current_activity(129129- fw_device, fw_request, SCI_FAILURE_RETRY_REQUIRED130130-commit 357378bbdedf24ce2b90e9bd831af4a9db3ec70a131131-Author: Dimitry Andric <dim@FreeBSD.org>132132-Date: Wed Jul 31 14:21:25 2024 +0200133133-134134- Fix enum warnings in qat135135-136136- This fixes a number of clang 19 warnings:137137-138138- sys/dev/qat/qat_api/common/compression/dc_session.c:154:15: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare]139139- 154 | if (CPA_TRUE == pService->comp_device_data.enableDmm) {140140- | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~141141- sys/dev/qat/qat_api/common/compression/dc_session.c:285:17: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare]142142- 285 | (CPA_TRUE == pService->comp_device_data.enableDmm) ?143143- | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~144144-145145- The `enableDmm` field of variable `comp_device_data` is of type146146- `icp_qat_hw_compression_delayed_match_t`, not `CpaBoolean`. In this147147- case, we can seamlessly replace the value with148148- `ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED`, which is numerically149149- equal to `CPA_TRUE`.150150-151151- MFC after: 3 days152152-153153-diff --git a/sys/dev/qat/qat_api/common/compression/dc_session.c b/sys/dev/qat/qat_api/common/compression/dc_session.c154154-index c92d6eebdc47..60f4410dac32 100644155155---- a/sys/dev/qat/qat_api/common/compression/dc_session.c156156-+++ b/sys/dev/qat/qat_api/common/compression/dc_session.c157157-@@ -151,7 +151,8 @@ dcCompHwBlockPopulate(sal_compression_service_t *pService,158158- }159159-160160- /* Set delay match mode */161161-- if (CPA_TRUE == pService->comp_device_data.enableDmm) {162162-+ if (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED ==163163-+ pService->comp_device_data.enableDmm) {164164- dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED;165165- } else {166166- dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_DISABLED;167167-@@ -282,7 +283,8 @@ dcCompHwBlockPopulateGen4(sal_compression_service_t *pService,168168- hw_comp_lower_csr.hash_update =169169- ICP_QAT_HW_COMP_20_SKIP_HASH_UPDATE_DONT_ALLOW;170170- hw_comp_lower_csr.edmm =171171-- (CPA_TRUE == pService->comp_device_data.enableDmm) ?172172-+ (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED ==173173-+ pService->comp_device_data.enableDmm) ?174174- ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_ENABLED :175175- ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_DISABLED;176176-177177-commit 67be1e195acfaec99ce4fffeb17111ce085755f7178178-Author: Dimitry Andric <dim@FreeBSD.org>179179-Date: Wed Jul 31 13:01:20 2024 +0200180180-181181- Fix enum warning in iavf182182-183183- This fixes a clang 19 warning:184184-185185- sys/dev/iavf/iavf_lib.c:514:39: error: comparison of different enumeration types ('enum virtchnl_vsi_type' and 'enum iavf_vsi_type') [-Werror,-Wenum-compare]186186- 514 | if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV)187187- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~188188-189189- The `vsi_type` field of `struct virtchnl_vsi_resource` is of type `enum190190- virtchnl_vsi_type`, not `enum iavf_vsi_type`. In this case, we can191191- seamlessly replace the value with `VIRTCHNL_VSI_SRIOV`, which is192192- numerically equal to `IAVF_VSI_SRIOV`.193193-194194- MFC after: 3 days195195-196196-diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c197197-index 883a722b3a03..f80e3765448f 100644198198---- a/sys/dev/iavf/iavf_lib.c199199-+++ b/sys/dev/iavf/iavf_lib.c200200-@@ -511,7 +511,7 @@ iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc)201201-202202- for (int i = 0; i < sc->vf_res->num_vsis; i++) {203203- /* XXX: We only use the first VSI we find */204204-- if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV)205205-+ if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV)206206- sc->vsi_res = &sc->vf_res->vsi_res[i];207207- }208208- if (!sc->vsi_res) {209209-commit 6f25b46721a18cf4f036d041e7e5d275800a00b3210210-Author: Dimitry Andric <dim@FreeBSD.org>211211-Date: Tue Jul 30 20:31:47 2024 +0200212212-213213- Fix enum warning in heimdal214214-215215- This fixes a clang 19 warning:216216-217217- crypto/heimdal/lib/krb5/deprecated.c:75:17: error: comparison of different enumeration types ('krb5_keytype' (aka 'enum ENCTYPE') and 'enum krb5_keytype_old') [-Werror,-Wenum-compare]218218- 75 | if (keytype != KEYTYPE_DES || context->etypes_des == NULL)219219- | ~~~~~~~ ^ ~~~~~~~~~~~220220-221221- In https://github.com/heimdal/heimdal/commit/3bebbe5323 this was solved222222- by adding a cast. That commit is rather large, so I'm only applying the223223- one-liner here.224224-225225- MFC after: 3 days226226-227227-diff --git a/crypto/heimdal/lib/krb5/deprecated.c b/crypto/heimdal/lib/krb5/deprecated.c228228-index e7c0105ebf7f..02cf7614f932 100644229229---- a/crypto/heimdal/lib/krb5/deprecated.c230230-+++ b/crypto/heimdal/lib/krb5/deprecated.c231231-@@ -72,7 +72,7 @@ krb5_keytype_to_enctypes_default (krb5_context context,232232- unsigned int i, n;233233- krb5_enctype *ret;234234-235235-- if (keytype != KEYTYPE_DES || context->etypes_des == NULL)236236-+ if (keytype != (krb5_keytype)KEYTYPE_DES || context->etypes_des == NULL)237237- return krb5_keytype_to_enctypes (context, keytype, len, val);238238-239239- for (n = 0; context->etypes_des[n]; ++n)
···11-From 22cdafe197ac960c5ce839ef6ec699b59f4b0080 Mon Sep 17 00:00:00 200122-From: Warner Losh <imp@FreeBSD.org>33-Date: Sat, 20 Jul 2024 09:57:53 -060044-Subject: cdefs.h: Don't define fallback for _Static_assert55-66-Remove pre 4.6 code to define _Static_assert in terms of _COUNTER. We77-no longer need to support compilers this old (in fact support for all88-pre gcc 10 compilers has been removed in -current). This is a partial99-MFC of that work because removing this fixes a bug that's oft reported1010-with -pedantic-errors and C++98 compilations.1111-1212-PR: 280382, 2767381313-Sponsored by: Netflix1414-1515-This is a direct commit to stable/14.1616----1717- sys/sys/cdefs.h | 9 ---------1818- 1 file changed, 9 deletions(-)1919-2020-diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h2121-index 19b7d8fe427d..a52864c5db9d 1006442222---- a/sys/sys/cdefs.h2323-+++ b/sys/sys/cdefs.h2424-@@ -277,15 +277,6 @@2525- #if (defined(__cplusplus) && __cplusplus >= 201103L) || \2626- __has_extension(cxx_static_assert)2727- #define _Static_assert(x, y) static_assert(x, y)2828--#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus)2929--/* Nothing, gcc 4.6 and higher has _Static_assert built-in */3030--#elif defined(__COUNTER__)3131--#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)3232--#define __Static_assert(x, y) ___Static_assert(x, y)3333--#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \3434-- __unused3535--#else3636--#define _Static_assert(x, y) struct __hack3737- #endif3838- #endif3939-4040--- 4141-cgit v1.2.3
···1515 export MAKEOBJDIRPREFIX=$TMP/obj1616 '';17171818+ alwaysKeepStatic = true;1919+1820 meta = with lib; {1921 platform = platforms.freebsd;2022 license = licenses.cddl;
+6
pkgs/os-specific/bsd/freebsd/pkgs/source.nix
···77 owner = "freebsd";88 repo = "freebsd-src";99 inherit (sourceData) rev hash;1010+1111+ # The GitHub export excludes some files in the git source1212+ # that were marked `export-ignore`.1313+ # A normal git checkout will keep those files,1414+ # matching the update script1515+ forceFetchGit = true;1016}
···1010 "nvidia"1111 "panfrost"1212 "panthor"1313+ "v3d"1314 ];1415 # these GPU families are partially supported upstream, they are also tricky to build in nixpkgs1516 # volunteers with specific hardware needed to build and test these package variants1616- additionalGPUFamilies = [ "ascend" ];1717+ additionalGPUFamilies = [1818+ "ascend"1919+ "tpu"2020+ ];1721 defaultSupport = builtins.listToAttrs (1822 # apple can only build on darwin, and it can't build everything else, and vice versa1923 builtins.map (gpu: {
+1-5
pkgs/top-level/aliases.nix
···515515 dotnet-sdk_3 = throw "'dotnet-sdk_3' has been renamed to/replaced by 'dotnetCorePackages.sdk_3_1'"; # Converted to throw 2024-10-17516516 dotnet-sdk_5 = throw "'dotnet-sdk_5' has been renamed to/replaced by 'dotnetCorePackages.sdk_5_0'"; # Converted to throw 2024-10-17517517 downonspot = throw "'downonspot' was removed because upstream has been taken down by a cease and desist"; # Added 2025-01-25518518+ dozenal = throw "dozenal has been removed because it does not compile and only minimal functionality"; # Added 2025-03-30518519 dstat = throw "'dstat' has been removed because it has been unmaintained since 2020. Use 'dool' instead."; # Added 2025-01-21519520 drush = throw "drush as a standalone package has been removed because it's no longer supported as a standalone tool";520521 dtv-scan-tables_linuxtv = dtv-scan-tables; # Added 2023-03-03···12491248 nux = throw "nux has been removed because it has been abandoned for 4 years"; # Added 2025-03-2212501249 nvidia-podman = throw "podman should use the Container Device Interface (CDI) instead. See https://web.archive.org/web/20240729183805/https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman"; # Added 2024-08-0212511250 nvidia-thrust = throw "nvidia-thrust has been removed because the project was deprecated; use cudaPackages.cuda_cccl";12521252- nvtop = lib.warnOnInstantiate "nvtop has been renamed to nvtopPackages.full" nvtopPackages.full; # Added 2024-02-2512531253- nvtop-amd = lib.warnOnInstantiate "nvtop-amd has been renamed to nvtopPackages.amd" nvtopPackages.amd; # Added 2024-02-2512541254- nvtop-nvidia = lib.warnOnInstantiate "nvtop-nvidia has been renamed to nvtopPackages.nvidia" nvtopPackages.nvidia; # Added 2024-02-2512551255- nvtop-intel = lib.warnOnInstantiate "nvtop-intel has been renamed to nvtopPackages.intel" nvtopPackages.intel; # Added 2024-02-2512561256- nvtop-msm = lib.warnOnInstantiate "nvtop-msm has been renamed to nvtopPackages.msm" nvtopPackages.msm; # Added 2024-02-251257125112581252 ### O ###12591253