diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-08-23 10:09:14 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-08-26 09:07:03 +0000 |
commit | 63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f (patch) | |
tree | d58934cb48f9c953b19a0d0d5cffc0d0c5561471 /nixpkgs/maintainers | |
parent | c4eef3dacb2a3d359561f30917d9e3cc4e041be9 (diff) | |
parent | 91a22f76cd1716f9d0149e8a5c68424bb691de15 (diff) | |
download | nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.gz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.bz2 nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.lz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.xz nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.zst nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
Diffstat (limited to 'nixpkgs/maintainers')
-rw-r--r-- | nixpkgs/maintainers/README.md | 114 | ||||
-rw-r--r-- | nixpkgs/maintainers/maintainer-list.nix | 261 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/haskell/update-stackage.sh | 1 | ||||
-rw-r--r-- | nixpkgs/maintainers/scripts/pluginupdate.py | 183 | ||||
-rw-r--r-- | nixpkgs/maintainers/team-list.nix | 27 |
5 files changed, 500 insertions, 86 deletions
diff --git a/nixpkgs/maintainers/README.md b/nixpkgs/maintainers/README.md new file mode 100644 index 000000000000..e12881851925 --- /dev/null +++ b/nixpkgs/maintainers/README.md @@ -0,0 +1,114 @@ +# Nixpkgs Maintainers + +The *Nixpkgs maintainers* are people who have assigned themselves to +maintain specific individual packages. We encourage people who care +about a package to assign themselves as a maintainer. When a pull +request is made against a package, OfBorg will notify the appropriate +maintainer(s). + +## Reviewing contributions + +### Individual maintainer list + +When adding users to [`maintainer-list.nix`](./maintainer-list.nix), the following +checks should be performed: + +- If the user has specified a GPG key, verify that the commit is + signed by their key. + + First, validate that the commit adding the maintainer is signed by + the key the maintainer listed. Check out the pull request and + compare its signing key with the listed key in the commit. + + If the commit is not signed or it is signed by a different user, ask + them to either recommit using that key or to remove their key + information. + + Given a maintainer entry like this: + + ``` nix + { + example = { + email = "user@example.com"; + name = "Example User"; + keys = [{ + fingerprint = "0000 0000 2A70 6423 0AED 3C11 F04F 7A19 AAA6 3AFE"; + }]; + } + }; + ``` + + First receive their key from a keyserver: + + $ gpg --recv-keys 0xF04F7A19AAA63AFE + gpg: key 0xF04F7A19AAA63AFE: public key "Example <user@example.com>" imported + gpg: Total number processed: 1 + gpg: imported: 1 + + Then check the commit is signed by that key: + + $ git log --show-signature + commit b87862a4f7d32319b1de428adb6cdbdd3a960153 + gpg: Signature made Wed Mar 12 13:32:24 2003 +0000 + gpg: using RSA key 000000002A7064230AED3C11F04F7A19AAA63AFE + gpg: Good signature from "Example User <user@example.com> + Author: Example User <user@example.com> + Date: Wed Mar 12 13:32:24 2003 +0000 + + maintainers: adding example + + and validate that there is a `Good signature` and the printed key + matches the user's submitted key. + + Note: GitHub's "Verified" label does not display the user's full key + fingerprint, and should not be used for validating the key matches. + +- If the user has specified a `github` account name, ensure they have + also specified a `githubId` and verify the two match. + + Maintainer entries that include a `github` field must also include + their `githubId`. People can and do change their GitHub name + frequently, and the ID is used as the official and stable identity + of the maintainer. + + Given a maintainer entry like this: + + ``` nix + { + example = { + email = "user@example.com"; + name = "Example User"; + github = "ghost"; + githubId = 10137; + } + }; + ``` + + First, make sure that the listed GitHub handle matches the author of + the commit. + + Then, visit the URL `https://api.github.com/users/ghost` and + validate that the `id` field matches the provided `githubId`. + +### Maintainer teams + +Feel free to create a new maintainer team in [`team-list.nix`](./team-list.nix) +when a group is collectively responsible for a collection of packages. +Use taste and personal judgement when deciding if a team is warranted. + +Teams are allowed to define their own rules about membership. + +For example, some teams will represent a business or other group which +wants to carefully track its members. Other teams may be very open about +who can join, and allow anybody to participate. + +When reviewing changes to a team, read the team's scope and the context +around the member list for indications about the team's membership +policy. + +In any case, request reviews from the existing team members. If the team +lists no specific membership policy, feel free to merge changes to the +team after giving the existing members a few days to respond. + +*Important:* If a team says it is a closed group, do not merge additions +to the team without an approval by at least one existing member. diff --git a/nixpkgs/maintainers/maintainer-list.nix b/nixpkgs/maintainers/maintainer-list.nix index 3c99e7299e07..780c1dbd9c48 100644 --- a/nixpkgs/maintainers/maintainer-list.nix +++ b/nixpkgs/maintainers/maintainer-list.nix @@ -644,6 +644,11 @@ githubId = 43479487; name = "Titouan Biteau"; }; + albertchae = { + github = "albertchae"; + githubId = 217050; + name = "Albert Chae"; + }; aldoborrero = { email = "aldoborrero+nixos@pm.me"; github = "aldoborrero"; @@ -1198,6 +1203,12 @@ githubId = 20933385; name = "Anton Latukha"; }; + antonmosich = { + email = "anton@mosich.at"; + github = "antonmosich"; + githubId = 27223336; + name = "Anton Mosich"; + }; antono = { email = "self@antono.info"; github = "antono"; @@ -1277,6 +1288,12 @@ githubId = 56009; name = "Arcadio Rubio García"; }; + arcayr = { + email = "nix@arcayr.online"; + github = "arcayr"; + githubId = 11192354; + name = "Elliot Speck"; + }; archer-65 = { email = "mario.liguori.056@gmail.com"; github = "archer-65"; @@ -1449,6 +1466,15 @@ githubId = 1482768; name = "Benjamin Asbach"; }; + asciimoth = { + name = "Andrew"; + email = "ascii@moth.contact"; + github = "asciimoth"; + githubId = 91414737; + keys = [{ + fingerprint = "C5C8 4658 CCFD 7E8E 71DE E933 AF3A E54F C3A3 5C9F"; + }]; + }; ashalkhakov = { email = "artyom.shalkhakov@gmail.com"; github = "ashalkhakov"; @@ -1722,6 +1748,11 @@ githubId = 135230; name = "Aycan iRiCAN"; }; + aynish = { + github = "Chickensoupwithrice"; + githubId = 22575913; + name = "Anish Lakhwara"; + }; azahi = { name = "Azat Bahawi"; email = "azat@bahawi.net"; @@ -3265,12 +3296,27 @@ fingerprint = "6E3A FA6D 915C C2A4 D26F C53E 7BB4 BA9C 783D 2BBC"; }]; }; + codec = { + email = "codec@fnord.cx"; + github = "codec"; + githubId = 118829; + name = "codec"; + }; CodeLongAndProsper90 = { github = "CodeLongAndProsper90"; githubId = 50145141; email = "jupiter@m.rdis.dev"; name = "Scott Little"; }; + codifryed = { + email = "gb@guyboldon.com"; + name = "Guy Boldon"; + github = "codifryed"; + githubId = 27779510; + keys = [{ + fingerprint = "FDF5 EF67 8CC1 FE22 1845 6A22 CF7B BB5B C756 1BD3"; + }]; + }; codsl = { email = "codsl@riseup.net"; github = "codsl"; @@ -3731,6 +3777,12 @@ githubId = 1298344; name = "Daniel Fullmer"; }; + danielrolls = { + email = "daniel.rolls.27@googlemail.com"; + github = "danielrolls"; + githubId = 50051176; + name = "Daniel Rolls"; + }; daniyalsuri6 = { email = "daniyal.suri@gmail.com"; github = "daniyalsuri6"; @@ -4317,6 +4369,11 @@ githubId = 997543; name = "Dmitry Malikov"; }; + DMills27 = { + github = "DMills27"; + githubId = 5251658; + name = "Dominic Mills"; + }; DmitryTsygankov = { email = "dmitry.tsygankov@gmail.com"; github = "DmitryTsygankov"; @@ -4660,6 +4717,11 @@ githubId = 7875; name = "Rommel Martinez"; }; + eclairevoyant = { + github = "eclairevoyant"; + githubId = 848000; + name = "éclairevoyant"; + }; edanaher = { email = "nixos@edanaher.net"; github = "edanaher"; @@ -5115,6 +5177,11 @@ githubId = 1583484; name = "Andrey Golovizin"; }; + errnoh = { + github = "errnoh"; + githubId = 373946; + name = "Erno Hopearuoho"; + }; ersin = { email = "me@ersinakinci.com"; github = "ersinakinci"; @@ -5494,6 +5561,13 @@ } ]; }; + fernsehmuell = { + email = "fernsehmuel@googlemail.com"; + matrix = "@fernsehmuell:matrix.org"; + github = "fernsehmuell"; + githubId = 5198058; + name = "Udo Sauer"; + }; ffinkdevs = { email = "fink@h0st.space"; github = "ffinkdevs"; @@ -5866,6 +5940,11 @@ githubId = 17859309; name = "Fuzen"; }; + fuzzdk = { + github = "fuzzdk"; + githubId = 12715461; + name = "Anders Bo Rasmussen"; + }; fwc = { github = "fwc"; githubId = 29337229; @@ -6177,6 +6256,12 @@ githubId = 471835; name = "Giorgio Gallo"; }; + GirardR1006 = { + email = "julien.girard2@cea.fr"; + github = "GirardR1006"; + githubId = 19275558; + name = "Julien Girard-Satabin"; + }; GKasparov = { email = "mizozahr@gmail.com"; github = "GKasparov"; @@ -7409,6 +7494,12 @@ githubId = 20320695; name = "Matan Bendix Shenhav"; }; + iynaix = { + email = "iynaix@gmail.com"; + github = "iynaix"; + githubId = 94313; + name = "Xianyi Lin"; + }; izorkin = { email = "Izorkin@gmail.com"; github = "Izorkin"; @@ -7445,6 +7536,12 @@ github = "j4m3s-s"; githubId = 9413812; }; + jacbart = { + name = "Jack Bartlett"; + email = "jacbart@gmail.com"; + github = "jacbart"; + githubId = 7909687; + }; jacfal = { name = "Jakub Pravda"; email = "me@jakubpravda.net"; @@ -7463,6 +7560,12 @@ githubId = 7558482; name = "Jack Gerrits"; }; + jaduff = { + email = "jdduffpublic@proton.me"; + github = "jaduff"; + githubId = 10690970; + name = "James Duff"; + }; jagajaga = { email = "ars.seroka@gmail.com"; github = "jagajaga"; @@ -7845,6 +7948,11 @@ githubId = 31008330; name = "Jann Marc Villablanca"; }; + jgarcia = { + github = "chewblacka"; + githubId = 18430320; + name = "John Garcia"; + }; jgart = { email = "jgart@dismail.de"; github = "jgarte"; @@ -8027,6 +8135,12 @@ githubId = 2308444; name = "Joshua Gilman"; }; + jmillerpdt = { + email = "jcmiller@pdtpartners.com"; + github = "jmillerpdt"; + githubId = 54179289; + name = "Jason Miller"; + }; jnsgruk = { email = "jon@sgrs.uk"; github = "jnsgruk"; @@ -8660,6 +8774,17 @@ githubId = 1927188; name = "karolchmist"; }; + kashw2 = { + email = "supra4keanu@hotmail.com"; + github = "kashw2"; + githubId = 15855440; + name = "Keanu Ashwell"; + }; + katexochen = { + github = "katexochen"; + githubId = 49727155; + name = "Paul Meyer"; + }; kayhide = { email = "kayhide@gmail.com"; github = "kayhide"; @@ -9105,12 +9230,6 @@ githubId = 2037002; name = "Konstantinos"; }; - kototama = { - email = "kototama@posteo.jp"; - github = "kototama"; - githubId = 128620; - name = "Kototama"; - }; kouyk = { email = "skykinetic@stevenkou.xyz"; github = "kouyk"; @@ -9897,6 +10016,12 @@ githubId = 8555953; name = "Laure Tavard"; }; + lu15w1r7h = { + email = "lwirth2000@gmail.com"; + github = "LU15W1R7H"; + githubId = 37505890; + name = "Luis Wirth"; + }; luc65r = { email = "lucas@ransan.tk"; github = "luc65r"; @@ -10994,6 +11119,12 @@ github = "michaelCTS"; githubId = 132582212; }; + michaeldonovan = { + email = "michael@mdonovan.dev"; + name = "Michael Donovan"; + github = "michaeldonovan"; + githubId = 14077230; + }; michaelgrahamevans = { email = "michaelgrahamevans@gmail.com"; name = "Michael Evans"; @@ -11658,6 +11789,12 @@ githubId = 220262; name = "Ion Mudreac"; }; + multisn8 = { + email = "all-things-nix@multisamplednight.com"; + github = "MultisampledNight"; + githubId = 80128916; + name = "MultisampledNight"; + }; multun = { email = "victor.collod@epita.fr"; github = "multun"; @@ -11721,6 +11858,12 @@ githubId = 38578268; name = "Morgan Wolfe"; }; + mxkrsv = { + email = "mxkrsv@disroot.org"; + github = "mxkrsv"; + githubId = 59313755; + name = "Maxim Karasev"; + }; myaats = { email = "mats@mats.sh"; github = "Myaats"; @@ -12405,6 +12548,12 @@ githubId = 15707703; name = "Helmi Nour"; }; + nrhtr = { + email = "jeremy@jenga.xyz"; + github = "nrhtr"; + githubId = 74261; + name = "Jeremy Parker"; + }; nshalman = { email = "nahamu@gmail.com"; github = "nshalman"; @@ -12724,6 +12873,11 @@ githubId = 357005; name = "Marco Orovecchia"; }; + orthros = { + github = "orthros"; + githubId = 7820716; + name = "orthros"; + }; osener = { email = "ozan@ozansener.com"; github = "osener"; @@ -13482,6 +13636,12 @@ githubId = 38314551; name = "Peter Okelmann"; }; + pokon548 = { + email = "nix@bukn.uk"; + github = "pokon548"; + githubId = 65808665; + name = "Bu Kun"; + }; polarmutex = { email = "brian@brianryall.xyz"; github = "polarmutex"; @@ -13831,6 +13991,12 @@ githubId = 115877; name = "Kenny Shen"; }; + quadradical = { + email = "nixos@henryhiles.com"; + github = "Henry-Hiles"; + githubId = 71790868; + name = "Henry Hiles"; + }; quag = { email = "quaggy@gmail.com"; github = "quag"; @@ -14516,6 +14682,12 @@ github = "RossComputerGuy"; githubId = 19699320; }; + rotaerk = { + name = "Matthew Stewart"; + email = "m.scott.stewart@gmail.com"; + github = "rotaerk"; + githubId = 17690823; + }; rowanG077 = { email = "goemansrowan@gmail.com"; github = "rowanG077"; @@ -14569,7 +14741,7 @@ name = "Rahul Butani"; }; rs0vere = { - email = "rs0vere@outlook.com"; + email = "rs0vere@proton.me"; github = "rs0vere"; githubId = 140035635; keys = [{ @@ -14994,6 +15166,13 @@ fingerprint = "30BB FF3F AB0B BB3E 0435 F83C 8E8F F66E 2AE8 D970"; }]; }; + scm2342 = { + name = "Sven Mattsen"; + email = "nix@sven.cc"; + matrix = "@scm:matrix.sven.cc"; + github = "scm2342"; + githubId = 154108; + }; scode = { email = "peter.schuller@infidyne.com"; github = "scode"; @@ -15219,6 +15398,13 @@ fingerprint = "7246 B6E1 ABB9 9A48 4395 FD11 DC26 B921 A9E9 DBDE"; }]; }; + sfr = { + email = "sol@solfisher.com"; + matrix = "@sfr:enby.space"; + github = "solfisher"; + githubId = 57151943; + name = "Sol Fisher Romanoff"; + }; sfrijters = { email = "sfrijters@gmail.com"; github = "SFrijters"; @@ -15811,6 +15997,12 @@ githubId = 2600039; name = "Spencer Janssen"; }; + spikespaz = { + name = "Jacob Birkett"; + email = "support@birkett.dev"; + github = "spikespaz"; + githubId = 12502988; + }; spinus = { email = "tomasz.czyz@gmail.com"; github = "spinus"; @@ -16243,6 +16435,12 @@ github = "sweenu"; githubId = 7051978; }; + swesterfeld = { + email = "stefan@space.twc.de"; + github = "swesterfeld"; + githubId = 14840066; + name = "Stefan Westerfeld"; + }; swflint = { email = "swflint@flintfam.org"; github = "swflint"; @@ -16436,6 +16634,12 @@ githubId = 863327; name = "Tyler Benster"; }; + tbidne = { + email = "tbidne@protonmail.com"; + github = "tbidne"; + githubId = 2856188; + name = "Thomas Bidne"; + }; tboerger = { email = "thomas@webhippie.de"; matrix = "@tboerger:matrix.org"; @@ -16939,6 +17143,13 @@ githubId = 1292007; name = "Sébastien Maccagnoni"; }; + tiredofit = { + email = "dave@tiredofit.ca"; + github = "tiredofit"; + githubId = 23528985; + name = "Dave Conroy"; + matrix = "@dave:tiredofit.ca"; + }; tirex = { email = "szymon@kliniewski.pl"; name = "Szymon Kliniewski"; @@ -17119,6 +17330,12 @@ githubId = 27586264; name = "Tobias Schmidt"; }; + totalchaos = { + email = "basil.keeler@outlook.com"; + github = "totalchaos05"; + githubId = 70387628; + name = "Basil Keeler"; + }; totoroot = { name = "Matthias Thym"; email = "git@thym.at"; @@ -17688,6 +17905,12 @@ fingerprint = "5814 50EB 6E17 E715 7C63 E7F1 9879 8C3C 4D68 8D6D"; }]; }; + viluon = { + email = "nix@viluon.me"; + github = "viluon"; + githubId = 7235381; + name = "Ondřej Kvapil"; + }; vincentbernat = { email = "vincent@bernat.ch"; github = "vincentbernat"; @@ -18388,6 +18611,17 @@ githubId = 3705333; name = "Dmitry V."; }; + yavko = { + name = "Yavor Kolev"; + email = "yavornkolev@gmail.com"; + matrix = "@yavor:nikolay.ems.host"; + github = "yavko"; + githubId = 15178513; + keys = [ + {fingerprint = "DC05 7015 ECD7 E68A 6426 EFD8 F07D 19A3 2407 F857";} + {fingerprint = "2874 581F F832 C9E9 AEC6 8D84 E57B F27C 8BB0 80B0";} + ]; + }; yayayayaka = { email = "nixpkgs@uwu.is"; matrix = "@yaya:uwu.is"; @@ -18496,6 +18730,13 @@ githubId = 647076; name = "Yorick van Pelt"; }; + YorikSar = { + name = "Yuriy Taraday"; + email = "yorik.sar@gmail.com"; + matrix = "@yorik.sar:matrix.org"; + github = "YorikSar"; + githubId = 428074; + }; yrashk = { email = "yrashk@gmail.com"; github = "yrashk"; @@ -18720,6 +18961,12 @@ github = "zeri42"; githubId = 68825133; }; + zestsystem = { + email = "mk337337@gmail.com"; + github = "zestsystem"; + githubId = 39456023; + name = "Mike Yim"; + }; zfnmxt = { name = "zfnmxt"; email = "zfnmxt@zfnmxt.com"; diff --git a/nixpkgs/maintainers/scripts/haskell/update-stackage.sh b/nixpkgs/maintainers/scripts/haskell/update-stackage.sh index ba64b42ba9b7..881cf5fd4837 100755 --- a/nixpkgs/maintainers/scripts/haskell/update-stackage.sh +++ b/nixpkgs/maintainers/scripts/haskell/update-stackage.sh @@ -66,6 +66,7 @@ sed -r \ -e '/ hie-bios /d' \ -e '/ ShellCheck /d' \ -e '/ Agda /d' \ + -e '/ stack /d' \ < "${tmpfile_new}" >> $stackage_config # Explanations: # cabal2nix, distribution-nixpkgs, jailbreak-cabal, language-nix: These are our packages and we know what we are doing. diff --git a/nixpkgs/maintainers/scripts/pluginupdate.py b/nixpkgs/maintainers/scripts/pluginupdate.py index 7c6cfd4fed7f..6a607eb62480 100644 --- a/nixpkgs/maintainers/scripts/pluginupdate.py +++ b/nixpkgs/maintainers/scripts/pluginupdate.py @@ -4,20 +4,20 @@ # - maintainers/scripts/update-luarocks-packages # format: -# $ nix run nixpkgs.python3Packages.black -c black update.py +# $ nix run nixpkgs#black maintainers/scripts/pluginupdate.py # type-check: -# $ nix run nixpkgs.python3Packages.mypy -c mypy update.py +# $ nix run nixpkgs#python3.pkgs.mypy maintainers/scripts/pluginupdate.py # linted: -# $ nix run nixpkgs.python3Packages.flake8 -c flake8 --ignore E501,E265 update.py +# $ nix run nixpkgs#python3.pkgs.flake8 -- --ignore E501,E265 maintainers/scripts/pluginupdate.py import argparse import csv import functools import http import json +import logging import os import subprocess -import logging import sys import time import traceback @@ -25,14 +25,14 @@ import urllib.error import urllib.parse import urllib.request import xml.etree.ElementTree as ET +from dataclasses import asdict, dataclass from datetime import datetime from functools import wraps from multiprocessing.dummy import Pool from pathlib import Path -from typing import Dict, List, Optional, Tuple, Union, Any, Callable -from urllib.parse import urljoin, urlparse from tempfile import NamedTemporaryFile -from dataclasses import dataclass, asdict +from typing import Any, Callable, Dict, List, Optional, Tuple, Union +from urllib.parse import urljoin, urlparse import git @@ -41,12 +41,13 @@ ATOM_LINK = "{http://www.w3.org/2005/Atom}link" # " ATOM_UPDATED = "{http://www.w3.org/2005/Atom}updated" # " LOG_LEVELS = { - logging.getLevelName(level): level for level in [ - logging.DEBUG, logging.INFO, logging.WARN, logging.ERROR ] + logging.getLevelName(level): level + for level in [logging.DEBUG, logging.INFO, logging.WARN, logging.ERROR] } log = logging.getLogger() + def retry(ExceptionToCheck: Any, tries: int = 4, delay: float = 3, backoff: float = 2): """Retry calling the decorated function using an exponential backoff. http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/ @@ -77,6 +78,7 @@ def retry(ExceptionToCheck: Any, tries: int = 4, delay: float = 3, backoff: floa return deco_retry + @dataclass class FetchConfig: proc: int @@ -91,22 +93,21 @@ def make_request(url: str, token=None) -> urllib.request.Request: # a dictionary of plugins and their new repositories -Redirects = Dict['PluginDesc', 'Repo'] +Redirects = Dict["PluginDesc", "Repo"] + class Repo: - def __init__( - self, uri: str, branch: str - ) -> None: + def __init__(self, uri: str, branch: str) -> None: self.uri = uri - '''Url to the repo''' + """Url to the repo""" self._branch = branch # Redirect is the new Repo to use - self.redirect: Optional['Repo'] = None + self.redirect: Optional["Repo"] = None self.token = "dummy_token" @property def name(self): - return self.uri.split('/')[-1] + return self.uri.split("/")[-1] @property def branch(self): @@ -114,6 +115,7 @@ class Repo: def __str__(self) -> str: return f"{self.uri}" + def __repr__(self) -> str: return f"Repo({self.name}, {self.uri})" @@ -125,9 +127,9 @@ class Repo: def latest_commit(self) -> Tuple[str, datetime]: log.debug("Latest commit") loaded = self._prefetch(None) - updated = datetime.strptime(loaded['date'], "%Y-%m-%dT%H:%M:%S%z") + updated = datetime.strptime(loaded["date"], "%Y-%m-%dT%H:%M:%S%z") - return loaded['rev'], updated + return loaded["rev"], updated def _prefetch(self, ref: Optional[str]): cmd = ["nix-prefetch-git", "--quiet", "--fetch-submodules", self.uri] @@ -144,23 +146,23 @@ class Repo: return loaded["sha256"] def as_nix(self, plugin: "Plugin") -> str: - return f'''fetchgit {{ + return f"""fetchgit {{ url = "{self.uri}"; rev = "{plugin.commit}"; sha256 = "{plugin.sha256}"; - }}''' + }}""" class RepoGitHub(Repo): - def __init__( - self, owner: str, repo: str, branch: str - ) -> None: + def __init__(self, owner: str, repo: str, branch: str) -> None: self.owner = owner self.repo = repo self.token = None - '''Url to the repo''' + """Url to the repo""" super().__init__(self.url(""), branch) - log.debug("Instantiating github repo owner=%s and repo=%s", self.owner, self.repo) + log.debug( + "Instantiating github repo owner=%s and repo=%s", self.owner, self.repo + ) @property def name(self): @@ -213,7 +215,6 @@ class RepoGitHub(Repo): new_repo = RepoGitHub(owner=new_owner, repo=new_name, branch=self.branch) self.redirect = new_repo - def prefetch(self, commit: str) -> str: if self.has_submodules(): sha256 = super().prefetch(commit) @@ -233,12 +234,12 @@ class RepoGitHub(Repo): else: submodule_attr = "" - return f'''fetchFromGitHub {{ + return f"""fetchFromGitHub {{ owner = "{self.owner}"; repo = "{self.repo}"; rev = "{plugin.commit}"; sha256 = "{plugin.sha256}";{submodule_attr} - }}''' + }}""" @dataclass(frozen=True) @@ -258,15 +259,14 @@ class PluginDesc: return self.repo.name < other.repo.name @staticmethod - def load_from_csv(config: FetchConfig, row: Dict[str, str]) -> 'PluginDesc': + def load_from_csv(config: FetchConfig, row: Dict[str, str]) -> "PluginDesc": branch = row["branch"] - repo = make_repo(row['repo'], branch.strip()) + repo = make_repo(row["repo"], branch.strip()) repo.token = config.github_token return PluginDesc(repo, branch.strip(), row["alias"]) - @staticmethod - def load_from_string(config: FetchConfig, line: str) -> 'PluginDesc': + def load_from_string(config: FetchConfig, line: str) -> "PluginDesc": branch = "HEAD" alias = None uri = line @@ -279,6 +279,7 @@ class PluginDesc: repo.token = config.github_token return PluginDesc(repo, branch.strip(), alias) + @dataclass class Plugin: name: str @@ -302,22 +303,38 @@ class Plugin: return copy -def load_plugins_from_csv(config: FetchConfig, input_file: Path,) -> List[PluginDesc]: +def load_plugins_from_csv( + config: FetchConfig, + input_file: Path, +) -> List[PluginDesc]: log.debug("Load plugins from csv %s", input_file) plugins = [] - with open(input_file, newline='') as csvfile: + with open(input_file, newline="") as csvfile: log.debug("Writing into %s", input_file) - reader = csv.DictReader(csvfile,) + reader = csv.DictReader( + csvfile, + ) for line in reader: plugin = PluginDesc.load_from_csv(config, line) plugins.append(plugin) return plugins + def run_nix_expr(expr): - with CleanEnvironment(): - cmd = ["nix", "eval", "--extra-experimental-features", - "nix-command", "--impure", "--json", "--expr", expr] + with CleanEnvironment() as nix_path: + cmd = [ + "nix", + "eval", + "--extra-experimental-features", + "nix-command", + "--impure", + "--json", + "--expr", + expr, + "--nix-path", + nix_path, + ] log.debug("Running command %s", " ".join(cmd)) out = subprocess.check_output(cmd) data = json.loads(out) @@ -348,7 +365,7 @@ class Editor: self.nixpkgs_repo = None def add(self, args): - '''CSV spec''' + """CSV spec""" log.debug("called the 'add' command") fetch_config = FetchConfig(args.proc, args.github_token) editor = self @@ -356,23 +373,27 @@ class Editor: log.debug("using plugin_line", plugin_line) pdesc = PluginDesc.load_from_string(fetch_config, plugin_line) log.debug("loaded as pdesc", pdesc) - append = [ pdesc ] - editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, append=append) - plugin, _ = prefetch_plugin(pdesc, ) + append = [pdesc] + editor.rewrite_input( + fetch_config, args.input_file, editor.deprecated, append=append + ) + plugin, _ = prefetch_plugin( + pdesc, + ) autocommit = not args.no_commit if autocommit: commit( editor.nixpkgs_repo, "{drv_name}: init at {version}".format( drv_name=editor.get_drv_name(plugin.normalized_name), - version=plugin.version + version=plugin.version, ), [args.outfile, args.input_file], ) # Expects arguments generated by 'update' subparser - def update(self, args ): - '''CSV spec''' + def update(self, args): + """CSV spec""" print("the update member function should be overriden in subclasses") def get_current_plugins(self) -> List[Plugin]: @@ -385,11 +406,11 @@ class Editor: return plugins def load_plugin_spec(self, config: FetchConfig, plugin_file) -> List[PluginDesc]: - '''CSV spec''' + """CSV spec""" return load_plugins_from_csv(config, plugin_file) def generate_nix(self, _plugins, _outfile: str): - '''Returns nothing for now, writes directly to outfile''' + """Returns nothing for now, writes directly to outfile""" raise NotImplementedError() def get_update(self, input_file: str, outfile: str, config: FetchConfig): @@ -413,7 +434,6 @@ class Editor: return update - @property def attr_path(self): return self.name + "Plugins" @@ -427,10 +447,11 @@ class Editor: def create_parser(self): common = argparse.ArgumentParser( add_help=False, - description=(f""" + description=( + f""" Updates nix derivations for {self.name} plugins.\n By default from {self.default_in} to {self.default_out}""" - ) + ), ) common.add_argument( "--input-names", @@ -463,26 +484,33 @@ class Editor: Uses GITHUB_API_TOKEN environment variables as the default value.""", ) common.add_argument( - "--no-commit", "-n", action="store_true", default=False, - help="Whether to autocommit changes" + "--no-commit", + "-n", + action="store_true", + default=False, + help="Whether to autocommit changes", ) common.add_argument( - "--debug", "-d", choices=LOG_LEVELS.keys(), + "--debug", + "-d", + choices=LOG_LEVELS.keys(), default=logging.getLevelName(logging.WARN), - help="Adjust log level" + help="Adjust log level", ) main = argparse.ArgumentParser( parents=[common], - description=(f""" + description=( + f""" Updates nix derivations for {self.name} plugins.\n By default from {self.default_in} to {self.default_out}""" - ) + ), ) subparsers = main.add_subparsers(dest="command", required=False) padd = subparsers.add_parser( - "add", parents=[], + "add", + parents=[], description="Add new plugin", add_help=False, ) @@ -502,10 +530,12 @@ class Editor: pupdate.set_defaults(func=self.update) return main - def run(self,): - ''' + def run( + self, + ): + """ Convenience function - ''' + """ parser = self.create_parser() args = parser.parse_args() command = args.command or "update" @@ -518,17 +548,15 @@ class Editor: getattr(self, command)(args) - - class CleanEnvironment(object): - def __enter__(self) -> None: + def __enter__(self) -> str: self.old_environ = os.environ.copy() local_pkgs = str(Path(__file__).parent.parent.parent) - os.environ["NIX_PATH"] = f"localpkgs={local_pkgs}" self.empty_config = NamedTemporaryFile() self.empty_config.write(b"{}") self.empty_config.flush() os.environ["NIXPKGS_CONFIG"] = self.empty_config.name + return f"localpkgs={local_pkgs}" def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: os.environ.update(self.old_environ) @@ -570,14 +598,15 @@ def print_download_error(plugin: PluginDesc, ex: Exception): ] print("\n".join(tb_lines)) + def check_results( results: List[Tuple[PluginDesc, Union[Exception, Plugin], Optional[Repo]]] ) -> Tuple[List[Tuple[PluginDesc, Plugin]], Redirects]: - ''' ''' + """ """ failures: List[Tuple[PluginDesc, Exception]] = [] plugins = [] redirects: Redirects = {} - for (pdesc, result, redirect) in results: + for pdesc, result, redirect in results: if isinstance(result, Exception): failures.append((pdesc, result)) else: @@ -594,17 +623,18 @@ def check_results( else: print(f", {len(failures)} plugin(s) could not be downloaded:\n") - for (plugin, exception) in failures: + for plugin, exception in failures: print_download_error(plugin, exception) sys.exit(1) + def make_repo(uri: str, branch) -> Repo: - '''Instantiate a Repo with the correct specialization depending on server (gitub spec)''' + """Instantiate a Repo with the correct specialization depending on server (gitub spec)""" # dumb check to see if it's of the form owner/repo (=> github) or https://... res = urlparse(uri) - if res.netloc in [ "github.com", ""]: - res = res.path.strip('/').split('/') + if res.netloc in ["github.com", ""]: + res = res.path.strip("/").split("/") repo = RepoGitHub(res[0], res[1], branch) else: repo = Repo(uri.strip(), branch) @@ -675,7 +705,6 @@ def prefetch( return (pluginDesc, e, None) - def rewrite_input( config: FetchConfig, input_file: Path, @@ -684,12 +713,14 @@ def rewrite_input( redirects: Redirects = {}, append: List[PluginDesc] = [], ): - plugins = load_plugins_from_csv(config, input_file,) + plugins = load_plugins_from_csv( + config, + input_file, + ) plugins.extend(append) if redirects: - cur_date_iso = datetime.now().strftime("%Y-%m-%d") with open(deprecated, "r") as f: deprecations = json.load(f) @@ -709,8 +740,8 @@ def rewrite_input( with open(input_file, "w") as f: log.debug("Writing into %s", input_file) # fields = dataclasses.fields(PluginDesc) - fieldnames = ['repo', 'branch', 'alias'] - writer = csv.DictWriter(f, fieldnames, dialect='unix', quoting=csv.QUOTE_NONE) + fieldnames = ["repo", "branch", "alias"] + writer = csv.DictWriter(f, fieldnames, dialect="unix", quoting=csv.QUOTE_NONE) writer.writeheader() for plugin in sorted(plugins): writer.writerow(asdict(plugin)) @@ -726,7 +757,6 @@ def commit(repo: git.Repo, message: str, files: List[Path]) -> None: print("no changes in working tree to commit") - def update_plugins(editor: Editor, args): """The main entry function of this module. All input arguments are grouped in the `Editor`.""" @@ -751,4 +781,3 @@ def update_plugins(editor: Editor, args): f"{editor.attr_path}: resolve github repository redirects", [args.outfile, args.input_file, editor.deprecated], ) - diff --git a/nixpkgs/maintainers/team-list.nix b/nixpkgs/maintainers/team-list.nix index f541d01a684b..b0bac14705b9 100644 --- a/nixpkgs/maintainers/team-list.nix +++ b/nixpkgs/maintainers/team-list.nix @@ -181,6 +181,19 @@ with lib.maintainers; { shortName = "Cosmopolitan"; }; + dotnet = { + members = [ + ivar + mdarocha + corngood + raphaelr + jamiemagee + anpin + ]; + scope = "Maintainers of the .NET build tools and packages"; + shortName = "dotnet"; + }; + deepin = { members = [ rewine @@ -413,6 +426,7 @@ with lib.maintainers; { jupyter = { members = [ + GaetanLepage natsukium ]; scope = "Maintain Jupyter and related packages."; @@ -425,7 +439,6 @@ with lib.maintainers; { offline saschagrunert srhb - zowoq ]; scope = "Maintain the Kubernetes package and module"; shortName = "Kubernetes"; @@ -712,7 +725,6 @@ with lib.maintainers; { adisbladis saschagrunert vdemeester - zowoq ]; githubTeams = [ "podman" @@ -734,6 +746,7 @@ with lib.maintainers; { fridh hexa jonringer + tjni ]; scope = "Maintain the Python interpreter and related packages."; shortName = "Python"; @@ -893,4 +906,14 @@ with lib.maintainers; { shortName = "Xfce"; enableFeatureFreezePing = true; }; + + zig = { + members = [ + AndersonTorres + figsoda + ]; + scope = "Maintain the Zig compiler toolchain and nixpkgs integration."; + shortName = "Zig"; + enableFeatureFreezePing = true; + }; } |