diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
commit | ea2acbed493e218f696673a004a95829392c5e33 (patch) | |
tree | c5716552f205bbf4d4addfa4675ea5073786bd06 /nixpkgs/maintainers | |
parent | 06ba6c84f858b011fb1132721e5d5e28fcda4a8a (diff) | |
parent | 8aa8cd68f4745eb92f003666bfd300f3e67cd9c1 (diff) | |
download | nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.gz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.bz2 nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.lz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.xz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.zst nixlib-ea2acbed493e218f696673a004a95829392c5e33.zip |
Merge branch 'staging' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/maintainers')
-rw-r--r-- | nixpkgs/maintainers/maintainer-list.nix | 121 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/sha256-to-SRI.py | 149 | ||||
-rw-r--r-- | nixpkgs/maintainers/team-list.nix | 10 |
3 files changed, 228 insertions, 52 deletions
diff --git a/nixpkgs/maintainers/maintainer-list.nix b/nixpkgs/maintainers/maintainer-list.nix index 12ea34f0fcb3..9dfbeb984fce 100644 --- a/nixpkgs/maintainers/maintainer-list.nix +++ b/nixpkgs/maintainers/maintainer-list.nix @@ -211,6 +211,16 @@ fingerprint = "7B59 F09E 0FE5 BC34 F032 1FB4 5270 1DE5 F5F5 1125"; }]; }; + _9glenda = { + email = "plan9git@proton.me"; + matrix = "@9front:matrix.org"; + github = "9glenda"; + githubId = 69043370; + name = "9glenda"; + keys = [{ + fingerprint = "DBF4 E6D0 90B8 BEA4 4BFE 1F1C 3442 4321 39B5 0691"; + }]; + }; a1russell = { email = "adamlr6+pub@gmail.com"; github = "a1russell"; @@ -448,6 +458,15 @@ githubId = 315003; name = "Adam Saponara"; }; + adtya = { + email = "adtya@adtya.xyz"; + github = "adtya"; + githubId = 22346805; + name = "Adithya Nair"; + keys = [{ + fingerprint = "51E4 F5AB 1B82 BE45 B422 9CC2 43A5 E25A A5A2 7849"; + }]; + }; aerialx = { email = "aaron+nixos@aaronlindsay.com"; github = "AerialX"; @@ -2420,12 +2439,6 @@ githubId = 1743184; name = "Boris Babić"; }; - borlaag = { - email = "borlaag@proton.me"; - github = "Borlaag"; - githubId = 114830266; - name = "Børlaag"; - }; bosu = { email = "boriss@gmail.com"; github = "bosu"; @@ -3106,7 +3119,7 @@ }; christianharke = { email = "christian@harke.ch"; - github = "christianharke"; + github = "rake5k"; githubId = 13007345; name = "Christian Harke"; keys = [{ @@ -3133,6 +3146,11 @@ fingerprint = "9C56 1D64 30B2 8D6B DCBC 9CEB 73D5 E7FD EE3D E49A"; }]; }; + chrpinedo = { + github = "chrpinedo"; + githubId = 2324630; + name = "Christian Pinedo"; + }; chuahou = { email = "human+github@chuahou.dev"; github = "chuahou"; @@ -4462,7 +4480,7 @@ DomesticMoth = { name = "Andrew"; email = "silkmoth@protonmail.com"; - github = "DomesticMoth"; + github = "asciimoth"; githubId = 91414737; keys = [{ fingerprint = "7D6B AE0A A98A FDE9 3396 E721 F87E 15B8 3AA7 3087"; @@ -4848,12 +4866,6 @@ githubId = 54799; name = "Edward Tjörnhammar"; }; - ee2500 = { - email = "earthengine@skiff.com"; - github = "ee2500"; - githubId = 134107129; - name = "EarthEngine"; - }; eelco = { email = "edolstra+nixpkgs@gmail.com"; github = "edolstra"; @@ -7197,6 +7209,12 @@ githubId = 69209; name = "Ian Duncan"; }; + ianliu = { + email = "ian.liu88@gmail.com"; + github = "ianliu"; + githubId = 30196; + name = "Ian Liu Rodrigues"; + }; ianmjones = { email = "ian@ianmjones.com"; github = "ianmjones"; @@ -7334,7 +7352,7 @@ }; imalison = { email = "IvanMalison@gmail.com"; - github = "IvanMalison"; + github = "colonelpanic8"; githubId = 1246619; name = "Ivan Malison"; }; @@ -7758,7 +7776,7 @@ jayesh-bhoot = { name = "Jayesh Bhoot"; email = "jb@jayeshbhoot.com"; - github = "bhootjb"; + github = "jyssh"; githubId = 1915507; }; jayman2000 = { @@ -8430,7 +8448,7 @@ }; jonnybolton = { email = "jonnybolton@gmail.com"; - github = "jonnybolton"; + github = "jonnynightingale"; githubId = 8580434; name = "Jonny Bolton"; }; @@ -8466,11 +8484,6 @@ github = "jorsn"; githubId = 4646725; }; - joscha = { - name = "joscha Loos"; - email = "j.loos@posteo.net"; - githubId = 57965027; - }; josephst = { name = "Joseph Stahl"; email = "hello@josephstahl.com"; @@ -9088,6 +9101,12 @@ githubId = 845652; name = "Kier Davis"; }; + kilianar = { + email = "mail@kilianar.de"; + github = "kilianar"; + githubId = 105428155; + name = "kilianar"; + }; kilimnik = { email = "mail@kilimnik.de"; github = "kilimnik"; @@ -9467,6 +9486,11 @@ githubId = 894884; name = "Jakub Kozłowski"; }; + kupac = { + github = "Kupac"; + githubId = 8224569; + name = "László Kupcsik"; + }; kurnevsky = { email = "kurnevsky@gmail.com"; github = "kurnevsky"; @@ -9765,7 +9789,7 @@ }; lethalman = { email = "lucabru@src.gnome.org"; - github = "lethalman"; + github = "lucabrunox"; githubId = 480920; name = "Luca Bruno"; }; @@ -10438,12 +10462,6 @@ github = "mac-chaffee"; githubId = 7581860; }; - maddiethecafebabe = { - email = "maddie@cafebabe.date"; - github = "maddiethecafebabe"; - githubId = 75337286; - name = "Madeline S."; - }; madjar = { email = "georges.dubus@compiletoi.net"; github = "madjar"; @@ -12190,12 +12208,6 @@ githubId = 77314501; name = "Maurice Zhou"; }; - nebulka = { - email = "arapun@proton.me"; - github = "nebulka1"; - githubId = 121920704; - name = "Nebulka"; - }; Necior = { email = "adrian@sadlocha.eu"; github = "Necior"; @@ -13019,7 +13031,7 @@ }; orichter = { email = "richter-oliver@gmx.net"; - github = "RichterOliver"; + github = "ORichterSec"; githubId = 135209509; name = "Oliver Richter"; }; @@ -13628,7 +13640,7 @@ }; pjbarnoy = { email = "pjbarnoy@gmail.com"; - github = "pjbarnoy"; + github = "waaamb"; githubId = 119460; name = "Perry Barnoy"; }; @@ -13674,7 +13686,7 @@ PlayerNameHere = { name = "Dixon Sean Low Yan Feng"; email = "dixonseanlow@protonmail.com"; - github = "PlayerNameHere"; + github = "dixslyf"; githubId = 56017218; keys = [{ fingerprint = "E6F4 BFB4 8DE3 893F 68FC A15F FF5F 4B30 A41B BAC8"; @@ -14380,7 +14392,7 @@ }; razvan = { email = "razvan.panda@gmail.com"; - github = "razvan-flavius-panda"; + github = "freeman42x"; githubId = 1758708; name = "Răzvan Flavius Panda"; }; @@ -14471,6 +14483,13 @@ githubId = 21069876; name = "Reed Williams"; }; + refi64 = { + name = "Ryan Gonzalez"; + email = "git@refi64.dev"; + matrix = "@refi64:linuxcafe.chat"; + github = "refi64"; + githubId = 1690697; + }; refnil = { email = "broemartino@gmail.com"; github = "refnil"; @@ -14867,6 +14886,12 @@ fingerprint = "1401 1B63 393D 16C1 AA9C C521 8526 B757 4A53 6236"; }]; }; + rossabaker = { + name = "Ross A. Baker"; + email = "ross@rossabaker.com"; + github = "rossabaker"; + githubId = 142698; + }; RossComputerGuy = { name = "Tristan Ross"; email = "tristan.ross@midstall.com"; @@ -16386,12 +16411,6 @@ fingerprint = "5D8B FA8B 286A C2EF 6EE4 8598 F742 B72C 8926 1A51"; }]; }; - stepech = { - name = "stepech"; - github = "stepech"; - githubId = 29132060; - matrix = "@stepech:matrix.org"; - }; stephank = { email = "nix@stephank.nl"; matrix = "@skochen:matrix.org"; @@ -17102,7 +17121,7 @@ name = "The Hedgehog"; email = "hedgehog@mrhedgehog.xyz"; matrix = "@mrhedgehog:jupiterbroadcasting.com"; - github = "theHedgehog0"; + github = "pyrox0"; githubId = 35778371; keys = [{ fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752"; @@ -18485,6 +18504,16 @@ githubId = 7121530; name = "Wolf Honoré"; }; + wigust = { + name = "Oleg Pykhalov"; + email = "go.wigust@gmail.com"; + github = "wigust"; + githubId = 7709598; + keys = [{ + # primary: "C955 CC5D C048 7FB1 7966 40A9 199A F6A3 67E9 4ABB" + fingerprint = "7238 7123 8EAC EB63 4548 5857 167F 8EA5 001A FA9C"; + }]; + }; wildsebastian = { name = "Sebastian Wild"; email = "sebastian@wild-siena.com"; diff --git a/nixpkgs/maintainers/scripts/sha256-to-SRI.py b/nixpkgs/maintainers/scripts/sha256-to-SRI.py new file mode 100755 index 000000000000..dcacb4c58044 --- /dev/null +++ b/nixpkgs/maintainers/scripts/sha256-to-SRI.py @@ -0,0 +1,149 @@ +#!/usr/bin/env nix-shell +#! nix-shell -i "python3 -I" -p "python3.withPackages(p: with p; [ rich structlog ])" + +from contextlib import contextmanager +from pathlib import Path +from structlog.contextvars import bound_contextvars as log_context + +import re, structlog + + +logger = structlog.getLogger("sha256-to-SRI") + + +nix32alphabet = "0123456789abcdfghijklmnpqrsvwxyz" +nix32inverted = { c: i for i, c in enumerate(nix32alphabet) } + +def nix32decode(s: str) -> bytes: + # only support sha256 hashes for now + assert len(s) == 52 + out = [ 0 for _ in range(32) ] + # TODO: Do better than a list of byte-sized ints + + for n, c in enumerate(reversed(s)): + digit = nix32inverted[c] + i, j = divmod(5 * n, 8) + out[i] = out[i] | (digit << j) & 0xff + rem = digit >> (8 - j) + if rem == 0: + continue + elif i < 31: + out[i+1] = rem + else: + raise ValueError(f"Invalid nix32 hash: '{s}'") + + return bytes(out) + + +def toSRI(digest: bytes) -> str: + from base64 import b64encode + assert len(digest) == 32 + return f"sha256-{b64encode(digest).decode()}" + + +RE = { + 'nix32': f"[{nix32alphabet}]" "{52}", + 'hex': "[0-9A-Fa-f]{64}", + 'base64': "[A-Za-z0-9+/]{43}=", +} +RE['sha256'] = '|'.join( + f"{'(sha256-)?' if name == 'base64' else ''}" + f"(?P<{name}>{r})" + for name, r in RE.items() +) + +def sha256toSRI(m: re.Match) -> str: + """Produce the equivalent SRI string for any match of RE['sha256']""" + if m['nix32'] is not None: + return toSRI(nix32decode(m['nix32'])) + if m['hex'] is not None: + from binascii import unhexlify + return toSRI(unhexlify(m['hex'])) + if m['base64'] is not None: + from base64 import b64decode + return toSRI(b64decode(m['base64'])) + + raise ValueError("Got a match where none of the groups captured") + + +# Ohno I used evil, irregular backrefs instead of making 2 variants ^^' +_def_re = re.compile( + "sha256 = (?P<quote>[\"'])" + f"({RE['sha256']})" + "(?P=quote);" +) + +def defToSRI(s: str) -> str: + def f(m: re.Match[str]) -> str: + try: + return f'hash = "{sha256toSRI(m)}";' + + except ValueError as exn: + begin, end = m.span() + match = m.string[begin:end] + + logger.error( + "Skipping", + exc_info = exn, + ) + return match + + return _def_re.sub(f, s) + + +@contextmanager +def atomicFileUpdate(target: Path): + '''Atomically replace the contents of a file. + + Guarantees that no temporary files are left behind, and `target` is either + left untouched, or overwritten with new content if no exception was raised. + + Yields a pair `(original, new)` of open files. + `original` is the pre-existing file at `target`, open for reading; + `new` is an empty, temporary file in the same filder, open for writing. + + Upon exiting the context, the files are closed; if no exception was + raised, `new` (atomically) replaces the `target`, otherwise it is deleted. + ''' + # That's mostly copied from noto-emoji.py, should DRY it out + from tempfile import mkstemp + fd, _p = mkstemp( + dir = target.parent, + prefix = target.name, + ) + tmpPath = Path(_p) + + try: + with target.open() as original: + with tmpPath.open('w') as new: + yield (original, new) + + tmpPath.replace(target) + + except Exception: + tmpPath.unlink(missing_ok = True) + raise + + +def fileToSRI(p: Path): + with atomicFileUpdate(p) as (og, new): + for i, line in enumerate(og): + with log_context(line=i): + new.write(defToSRI(line)) + + +if __name__ == "__main__": + from sys import argv, stderr + + for arg in argv[1:]: + p = Path(arg) + with log_context(path=str(p)): + try: + fileToSRI(p) + except Exception as exn: + logger.error( + "Unhandled exception, skipping file!", + exc_info = exn, + ) + else: + logger.info("Finished processing file") diff --git a/nixpkgs/maintainers/team-list.nix b/nixpkgs/maintainers/team-list.nix index cba6f0d43642..6b90ce30588b 100644 --- a/nixpkgs/maintainers/team-list.nix +++ b/nixpkgs/maintainers/team-list.nix @@ -287,7 +287,7 @@ with lib.maintainers; { }; flutter = { - members = [ gilice mkg20001 RossComputerGuy FlafyDev hacker1024 ]; + members = [ mkg20001 RossComputerGuy FlafyDev hacker1024 ]; scope = "Maintain Flutter and Dart-related packages and build tools"; shortName = "flutter"; enableFeatureFreezePing = false; @@ -649,15 +649,13 @@ with lib.maintainers; { enableFeatureFreezePing = true; }; - nixos-modules = { + module-system = { members = [ - ericson2314 infinisil - qyliss roberth ]; - scope = "Maintain nixpkgs module system internals."; - shortName = "NixOS Modules / internals"; + scope = "Maintain the Nixpkgs module system."; + shortName = "Module system"; enableFeatureFreezePing = true; }; |