···66 description = "Functions and classes to access online data resources";
67 homepage = "https://astroquery.readthedocs.io/";
68 license = licenses.bsd3;
0069 maintainers = [ maintainers.smaret ];
70 };
71}
···66 description = "Functions and classes to access online data resources";
67 homepage = "https://astroquery.readthedocs.io/";
68 license = licenses.bsd3;
69+ # Broken since a certain astropy update, due to API incompatibility
70+ broken = true;
71 maintainers = [ maintainers.smaret ];
72 };
73}
···1+{ branch, lib, fetchurl, fetchzip, buildLinux, ... } @ args:
23let
4 allKernels = builtins.fromJSON (builtins.readFile ./kernels-org.json);
5 thisKernel = allKernels.${branch};
6+ inherit (thisKernel) version;
78+ src =
9+ # testing kernels are a special case because they don't have tarballs on the CDN
10+ if branch == "testing"
11+ then fetchzip {
12+ url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
13+ inherit (thisKernel) hash;
14+ }
15+ else fetchurl {
16+ url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz";
17+ inherit (thisKernel) hash;
18+ };
19+20+ args' = (builtins.removeAttrs args ["branch"]) // {
21+ inherit src version;
22+23 modDirVersion = lib.versions.pad 3 version;
24 extraMeta.branch = branch;
0000025 } // (args.argsOverride or {});
26in
27buildLinux args'
+49-23
pkgs/os-specific/linux/kernel/update-mainline.py
···1#!/usr/bin/env nix-shell
2#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ])"
3-from enum import Enum
4-from bs4 import BeautifulSoup, NavigableString, Tag
5-from dataclasses import dataclass
6import json
07import pathlib
8-import re
9import subprocess
10-import urllib.request
11import sys
0001201314HERE = pathlib.Path(__file__).parent
15ROOT = HERE.parent.parent.parent.parent
16VERSIONS_FILE = HERE / "kernels-org.json"
01718class KernelNature(Enum):
19 MAINLINE = 1
20 STABLE = 2
21 LONGTERM = 3
02223@dataclass
24class KernelRelease:
25 nature: KernelNature
26 version: str
027 date: str
28 link: str
29 eol: bool = False
03031def parse_release(release: Tag) -> KernelRelease | None:
32- columns: list[Tag] = list(release.find_all('td'))
33 try:
34- nature = KernelNature[columns[0].get_text().rstrip(':').upper()]
35 except KeyError:
36 return None
3738- version = columns[1].get_text().rstrip(' [EOL]')
39 date = columns[2].get_text()
40- link = columns[3].find('a')
41 if link is not None and isinstance(link, Tag):
42- link = link.attrs.get('href')
43- assert link is not None, f'link for kernel {version} is non-existent'
44- eol = bool(release.find(class_='eolkernel'))
4546- return KernelRelease(nature=nature, version=version, date=date, link=link, eol=eol)
000000004748def get_branch(version: str):
49 # This is a testing kernel.
50- if 'rc' in version:
51- return 'testing'
52 else:
53 major, minor, *_ = version.split(".")
54 return f"{major}.{minor}"
555657-def get_hash(url: str):
58- return subprocess.check_output(["nix-prefetch-url", url]).decode().strip()
0000000000596061def commit(message):
···65def main():
66 kernel_org = urllib.request.urlopen("https://kernel.org/")
67 soup = BeautifulSoup(kernel_org.read().decode(), "lxml")
68- release_table = soup.find(id='releases')
69 if not release_table or isinstance(release_table, NavigableString):
70 print(release_table)
71- print('Failed to find the release table on https://kernel.org')
72 sys.exit(1)
7374- releases = release_table.find_all('tr')
75 parsed_releases = filter(None, [parse_release(release) for release in releases])
76 all_kernels = json.load(VERSIONS_FILE.open())
7778 for kernel in parsed_releases:
79 branch = get_branch(kernel.version)
80- nixpkgs_branch = branch.replace('.', '_')
8182 old_version = all_kernels.get(branch, {}).get("version")
83 if old_version == kernel.version:
···9192 print(message)
9394- all_kernels[branch] = {"version": kernel.version, "hash": get_hash(kernel.link)}
0009596 with VERSIONS_FILE.open("w") as fd:
97 json.dump(all_kernels, fd, indent=4)
98 fd.write("\n") # makes editorconfig happy
99100- commit(message)
0101102103if __name__ == "__main__":
···1#!/usr/bin/env nix-shell
2#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ])"
0003import json
4+import os
5import pathlib
06import subprocess
07import sys
8+import urllib.request
9+from dataclasses import dataclass
10+from enum import Enum
1112+from bs4 import BeautifulSoup, NavigableString, Tag
1314HERE = pathlib.Path(__file__).parent
15ROOT = HERE.parent.parent.parent.parent
16VERSIONS_FILE = HERE / "kernels-org.json"
17+1819class KernelNature(Enum):
20 MAINLINE = 1
21 STABLE = 2
22 LONGTERM = 3
23+2425@dataclass
26class KernelRelease:
27 nature: KernelNature
28 version: str
29+ branch: str
30 date: str
31 link: str
32 eol: bool = False
33+3435def parse_release(release: Tag) -> KernelRelease | None:
36+ columns: list[Tag] = list(release.find_all("td"))
37 try:
38+ nature = KernelNature[columns[0].get_text().rstrip(":").upper()]
39 except KeyError:
40 return None
4142+ version = columns[1].get_text().rstrip(" [EOL]")
43 date = columns[2].get_text()
44+ link = columns[3].find("a")
45 if link is not None and isinstance(link, Tag):
46+ link = link.attrs.get("href")
47+ assert link is not None, f"link for kernel {version} is non-existent"
48+ eol = bool(release.find(class_="eolkernel"))
4950+ return KernelRelease(
51+ nature=nature,
52+ branch=get_branch(version),
53+ version=version,
54+ date=date,
55+ link=link,
56+ eol=eol,
57+ )
58+5960def get_branch(version: str):
61 # This is a testing kernel.
62+ if "rc" in version:
63+ return "testing"
64 else:
65 major, minor, *_ = version.split(".")
66 return f"{major}.{minor}"
676869+def get_hash(kernel: KernelRelease):
70+ if kernel.branch == "testing":
71+ args = ["--unpack"]
72+ else:
73+ args = []
74+75+ hash = (
76+ subprocess.check_output(["nix-prefetch-url", kernel.link] + args)
77+ .decode()
78+ .strip()
79+ )
80+ return f"sha256:{hash}"
818283def commit(message):
···87def main():
88 kernel_org = urllib.request.urlopen("https://kernel.org/")
89 soup = BeautifulSoup(kernel_org.read().decode(), "lxml")
90+ release_table = soup.find(id="releases")
91 if not release_table or isinstance(release_table, NavigableString):
92 print(release_table)
93+ print("Failed to find the release table on https://kernel.org")
94 sys.exit(1)
9596+ releases = release_table.find_all("tr")
97 parsed_releases = filter(None, [parse_release(release) for release in releases])
98 all_kernels = json.load(VERSIONS_FILE.open())
99100 for kernel in parsed_releases:
101 branch = get_branch(kernel.version)
102+ nixpkgs_branch = branch.replace(".", "_")
103104 old_version = all_kernels.get(branch, {}).get("version")
105 if old_version == kernel.version:
···113114 print(message)
115116+ all_kernels[branch] = {
117+ "version": kernel.version,
118+ "hash": get_hash(kernel),
119+ }
120121 with VERSIONS_FILE.open("w") as fd:
122 json.dump(all_kernels, fd, indent=4)
123 fd.write("\n") # makes editorconfig happy
124125+ if os.environ.get("COMMIT") == "1":
126+ commit(message)
127128129if __name__ == "__main__":
+5-2
pkgs/test/nixpkgs-check-by-name/default.nix
···26 export NIX_STATE_DIR=$TEST_ROOT/var/nix
27 export NIX_STORE_DIR=$TEST_ROOT/store
2829- # cargo tests run in parallel by default, which would then run into
30- # https://github.com/NixOS/nix/issues/2706 unless the store is initialised first
31 nix-store --init
32 '';
00033 postCheck = ''
34 cargo fmt --check
35 cargo clippy -- -D warnings
···26 export NIX_STATE_DIR=$TEST_ROOT/var/nix
27 export NIX_STORE_DIR=$TEST_ROOT/store
2829+ # Ensure that even if tests run in parallel, we don't get an error
30+ # We'd run into https://github.com/NixOS/nix/issues/2706 unless the store is initialised first
31 nix-store --init
32 '';
33+ # The tests use the shared environment variables,
34+ # so we cannot run them in parallel
35+ dontUseCargoParallelTests = true;
36 postCheck = ''
37 cargo fmt --check
38 cargo clippy -- -D warnings
···1520 qlandkartegt = throw "'qlandkartegt' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-04-17
1521 qr-filetransfer = throw ''"qr-filetransfer" has been renamed to "qrcp"''; # Added 2020-12-02
1522 qshowdiff = throw "'qshowdiff' (Qt4) is unmaintained and not been updated since its addition in 2010"; # Added 2022-06-14
001523 qtscrobbler = throw "qtscrobbler has been removed, because it was unmaintained"; # Added 2022-05-26
1524 qt-3 = throw "qt-3 has been removed from nixpkgs, as it's unmaintained and insecure"; # Added 2021-02-15
1525 qt512 = throw "Qt 5 versions prior to 5.15 are no longer supported upstream and have been removed"; # Added 2022-11-24
···1520 qlandkartegt = throw "'qlandkartegt' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-04-17
1521 qr-filetransfer = throw ''"qr-filetransfer" has been renamed to "qrcp"''; # Added 2020-12-02
1522 qshowdiff = throw "'qshowdiff' (Qt4) is unmaintained and not been updated since its addition in 2010"; # Added 2022-06-14
1523+ qscintilla = libsForQt5.qscintilla; # Added 2023-09-20
1524+ qscintilla-qt6 = qt6Packages.qscintilla; # Added 2023-09-20
1525 qtscrobbler = throw "qtscrobbler has been removed, because it was unmaintained"; # Added 2022-05-26
1526 qt-3 = throw "qt-3 has been removed from nixpkgs, as it's unmaintained and insecure"; # Added 2021-02-15
1527 qt512 = throw "Qt 5 versions prior to 5.15 are no longer supported upstream and have been removed"; # Added 2022-11-24