···6666 description = "Functions and classes to access online data resources";
6767 homepage = "https://astroquery.readthedocs.io/";
6868 license = licenses.bsd3;
6969+ # Broken since a certain astropy update, due to API incompatibility
7070+ broken = true;
6971 maintainers = [ maintainers.smaret ];
7072 };
7173}
···11#!/usr/bin/env nix-shell
22#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ])"
33-from enum import Enum
44-from bs4 import BeautifulSoup, NavigableString, Tag
55-from dataclasses import dataclass
63import json
44+import os
75import pathlib
88-import re
96import subprocess
1010-import urllib.request
117import sys
88+import urllib.request
99+from dataclasses import dataclass
1010+from enum import Enum
12111212+from bs4 import BeautifulSoup, NavigableString, Tag
13131414HERE = pathlib.Path(__file__).parent
1515ROOT = HERE.parent.parent.parent.parent
1616VERSIONS_FILE = HERE / "kernels-org.json"
1717+17181819class KernelNature(Enum):
1920 MAINLINE = 1
2021 STABLE = 2
2122 LONGTERM = 3
2323+22242325@dataclass
2426class KernelRelease:
2527 nature: KernelNature
2628 version: str
2929+ branch: str
2730 date: str
2831 link: str
2932 eol: bool = False
3333+30343135def parse_release(release: Tag) -> KernelRelease | None:
3232- columns: list[Tag] = list(release.find_all('td'))
3636+ columns: list[Tag] = list(release.find_all("td"))
3337 try:
3434- nature = KernelNature[columns[0].get_text().rstrip(':').upper()]
3838+ nature = KernelNature[columns[0].get_text().rstrip(":").upper()]
3539 except KeyError:
3640 return None
37413838- version = columns[1].get_text().rstrip(' [EOL]')
4242+ version = columns[1].get_text().rstrip(" [EOL]")
3943 date = columns[2].get_text()
4040- link = columns[3].find('a')
4444+ link = columns[3].find("a")
4145 if link is not None and isinstance(link, Tag):
4242- link = link.attrs.get('href')
4343- assert link is not None, f'link for kernel {version} is non-existent'
4444- eol = bool(release.find(class_='eolkernel'))
4646+ link = link.attrs.get("href")
4747+ assert link is not None, f"link for kernel {version} is non-existent"
4848+ eol = bool(release.find(class_="eolkernel"))
45494646- return KernelRelease(nature=nature, version=version, date=date, link=link, eol=eol)
5050+ return KernelRelease(
5151+ nature=nature,
5252+ branch=get_branch(version),
5353+ version=version,
5454+ date=date,
5555+ link=link,
5656+ eol=eol,
5757+ )
5858+47594860def get_branch(version: str):
4961 # This is a testing kernel.
5050- if 'rc' in version:
5151- return 'testing'
6262+ if "rc" in version:
6363+ return "testing"
5264 else:
5365 major, minor, *_ = version.split(".")
5466 return f"{major}.{minor}"
556756685757-def get_hash(url: str):
5858- return subprocess.check_output(["nix-prefetch-url", url]).decode().strip()
6969+def get_hash(kernel: KernelRelease):
7070+ if kernel.branch == "testing":
7171+ args = ["--unpack"]
7272+ else:
7373+ args = []
7474+7575+ hash = (
7676+ subprocess.check_output(["nix-prefetch-url", kernel.link] + args)
7777+ .decode()
7878+ .strip()
7979+ )
8080+ return f"sha256:{hash}"
598160826183def commit(message):
···6587def main():
6688 kernel_org = urllib.request.urlopen("https://kernel.org/")
6789 soup = BeautifulSoup(kernel_org.read().decode(), "lxml")
6868- release_table = soup.find(id='releases')
9090+ release_table = soup.find(id="releases")
6991 if not release_table or isinstance(release_table, NavigableString):
7092 print(release_table)
7171- print('Failed to find the release table on https://kernel.org')
9393+ print("Failed to find the release table on https://kernel.org")
7294 sys.exit(1)
73957474- releases = release_table.find_all('tr')
9696+ releases = release_table.find_all("tr")
7597 parsed_releases = filter(None, [parse_release(release) for release in releases])
7698 all_kernels = json.load(VERSIONS_FILE.open())
779978100 for kernel in parsed_releases:
79101 branch = get_branch(kernel.version)
8080- nixpkgs_branch = branch.replace('.', '_')
102102+ nixpkgs_branch = branch.replace(".", "_")
8110382104 old_version = all_kernels.get(branch, {}).get("version")
83105 if old_version == kernel.version:
···9111392114 print(message)
931159494- all_kernels[branch] = {"version": kernel.version, "hash": get_hash(kernel.link)}
116116+ all_kernels[branch] = {
117117+ "version": kernel.version,
118118+ "hash": get_hash(kernel),
119119+ }
9512096121 with VERSIONS_FILE.open("w") as fd:
97122 json.dump(all_kernels, fd, indent=4)
98123 fd.write("\n") # makes editorconfig happy
99124100100- commit(message)
125125+ if os.environ.get("COMMIT") == "1":
126126+ commit(message)
101127102128103129if __name__ == "__main__":
+5-2
pkgs/test/nixpkgs-check-by-name/default.nix
···2626 export NIX_STATE_DIR=$TEST_ROOT/var/nix
2727 export NIX_STORE_DIR=$TEST_ROOT/store
28282929- # cargo tests run in parallel by default, which would then run into
3030- # https://github.com/NixOS/nix/issues/2706 unless the store is initialised first
2929+ # Ensure that even if tests run in parallel, we don't get an error
3030+ # We'd run into https://github.com/NixOS/nix/issues/2706 unless the store is initialised first
3131 nix-store --init
3232 '';
3333+ # The tests use the shared environment variables,
3434+ # so we cannot run them in parallel
3535+ dontUseCargoParallelTests = true;
3336 postCheck = ''
3437 cargo fmt --check
3538 cargo clippy -- -D warnings
···15201520 qlandkartegt = throw "'qlandkartegt' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-04-17
15211521 qr-filetransfer = throw ''"qr-filetransfer" has been renamed to "qrcp"''; # Added 2020-12-02
15221522 qshowdiff = throw "'qshowdiff' (Qt4) is unmaintained and not been updated since its addition in 2010"; # Added 2022-06-14
15231523+ qscintilla = libsForQt5.qscintilla; # Added 2023-09-20
15241524+ qscintilla-qt6 = qt6Packages.qscintilla; # Added 2023-09-20
15231525 qtscrobbler = throw "qtscrobbler has been removed, because it was unmaintained"; # Added 2022-05-26
15241526 qt-3 = throw "qt-3 has been removed from nixpkgs, as it's unmaintained and insecure"; # Added 2021-02-15
15251527 qt512 = throw "Qt 5 versions prior to 5.15 are no longer supported upstream and have been removed"; # Added 2022-11-24