diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-31 22:19:45 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-31 22:19:45 +0100 |
commit | 78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc (patch) | |
tree | fd9cfb92edfaa37c919be8d24063b8a6c6d94c83 /nixpkgs/maintainers | |
parent | 7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769 (diff) | |
parent | 0cbe9f69c234a7700596e943bfae7ef27a31b735 (diff) | |
download | nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.gz nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.bz2 nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.lz nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.xz nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.tar.zst nixlib-78ba0c65b7bf9a64c12ca8c08f2e0220afdc8dbc.zip |
Merge commit '0cbe9f69c234a7700596e943bfae7ef27a31b735' into HEAD
Diffstat (limited to 'nixpkgs/maintainers')
-rw-r--r-- | nixpkgs/maintainers/maintainer-list.nix | 72 | ||||
-rw-r--r-- | nixpkgs/maintainers/scripts/pluginupdate.py | 15 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/update-luarocks-packages | 224 | ||||
-rw-r--r-- | nixpkgs/maintainers/scripts/update-luarocks-shell.nix | 13 | ||||
-rw-r--r-- | nixpkgs/maintainers/team-list.nix | 2 |
5 files changed, 73 insertions, 253 deletions
diff --git a/nixpkgs/maintainers/maintainer-list.nix b/nixpkgs/maintainers/maintainer-list.nix index bb0f7c67a917..40fbec456dc9 100644 --- a/nixpkgs/maintainers/maintainer-list.nix +++ b/nixpkgs/maintainers/maintainer-list.nix @@ -1386,6 +1386,12 @@ githubId = 59743220; name = "Vinícius Müller"; }; + arcuru = { + email = "patrick@jackson.dev"; + github = "arcuru"; + githubId = 160646; + name = "Patrick Jackson"; + }; ardumont = { email = "eniotna.t@gmail.com"; github = "ardumont"; @@ -1765,12 +1771,6 @@ githubId = 1217745; name = "Aldwin Vlasblom"; }; - aveltras = { - email = "romain.viallard@outlook.fr"; - github = "aveltras"; - githubId = 790607; - name = "Romain Viallard"; - }; averelld = { email = "averell+nixos@rxd4.com"; github = "averelld"; @@ -2763,6 +2763,12 @@ githubId = 7435854; name = "Victor Calvert"; }; + camelpunch = { + email = "me@andrewbruce.net"; + github = "camelpunch"; + githubId = 141733; + name = "Andrew Bruce"; + }; cameronfyfe = { email = "cameron.j.fyfe@gmail.com"; github = "cameronfyfe"; @@ -7454,6 +7460,12 @@ githubId = 25505957; name = "Ilian"; }; + iliayar = { + email = "iliayar3@gmail.com"; + github = "iliayar"; + githubId = 17529355; + name = "Ilya Yaroshevskiy"; + }; ilikeavocadoes = { email = "ilikeavocadoes@hush.com"; github = "ilikeavocadoes"; @@ -7866,6 +7878,12 @@ githubId = 2212681; name = "Jakub Grzgorz Sokołowski"; }; + jakuzure = { + email = "shin@posteo.jp"; + github = "jakuzure"; + githubId = 11823547; + name = "jakuzure"; + }; jali-clarke = { email = "jinnah.ali-clarke@outlook.com"; name = "Jinnah Ali-Clarke"; @@ -9770,6 +9788,11 @@ }]; name = "Joseph LaFreniere"; }; + lagoja = { + github = "Lagoja"; + githubId =750845; + name = "John Lago"; + }; laikq = { email = "gwen@quasebarth.de"; github = "laikq"; @@ -12085,6 +12108,16 @@ githubId = 839693; name = "Ingolf Wanger"; }; + msanft = { + email = "moritz.sanft@outlook.de"; + matrix = "@msanft:matrix.org"; + name = "Moritz Sanft"; + github = "msanft"; + githubId = 58110325; + keys = [{ + fingerprint = "3CAC 1D21 3D97 88FF 149A E116 BB8B 30F5 A024 C31C"; + }]; + }; mschristiansen = { email = "mikkel@rheosystems.com"; github = "mschristiansen"; @@ -13297,6 +13330,15 @@ githubId = 75299; name = "Malcolm Matalka"; }; + orhun = { + email = "orhunparmaksiz@gmail.com"; + github = "orhun"; + githubId = 24392180; + name = "Orhun Parmaksız"; + keys = [{ + fingerprint = "165E 0FF7 C48C 226E 1EC3 63A7 F834 2482 4B3E 4B90"; + }]; + }; orichter = { email = "richter-oliver@gmx.net"; github = "ORichterSec"; @@ -13541,12 +13583,6 @@ githubId = 6931743; name = "pasqui23"; }; - patricksjackson = { - email = "patrick@jackson.dev"; - github = "patricksjackson"; - githubId = 160646; - name = "Patrick Jackson"; - }; patryk27 = { email = "pwychowaniec@pm.me"; github = "Patryk27"; @@ -13568,6 +13604,11 @@ githubId = 15645854; name = "Brad Christensen"; }; + paumr = { + github = "paumr"; + name = "Michael Bergmeister"; + githubId = 53442728; + }; paveloom = { email = "paveloom@riseup.net"; github = "paveloom"; @@ -13629,6 +13670,7 @@ pbsds = { name = "Peder Bergebakken Sundt"; email = "pbsds@hotmail.com"; + matrix = "@pederbs:pvv.ntnu.no"; github = "pbsds"; githubId = 140964; }; @@ -19518,6 +19560,12 @@ fingerprint = "85F8 E850 F8F2 F823 F934 535B EC50 6589 9AEA AF4C"; }]; }; + yunfachi = { + email = "yunfachi@gmail.com"; + github = "yunfachi"; + githubId = 73419713; + name = "Yunfachi"; + }; yureien = { email = "contact@sohamsen.me"; github = "Yureien"; diff --git a/nixpkgs/maintainers/scripts/pluginupdate.py b/nixpkgs/maintainers/scripts/pluginupdate.py index 52e9af399709..44a445875d91 100644 --- a/nixpkgs/maintainers/scripts/pluginupdate.py +++ b/nixpkgs/maintainers/scripts/pluginupdate.py @@ -468,6 +468,7 @@ class Editor: "--input-names", "-i", dest="input_file", + type=Path, default=self.default_in, help="A list of plugins in the form owner/repo", ) @@ -476,6 +477,7 @@ class Editor: "-o", dest="outfile", default=self.default_out, + type=Path, help="Filename to save generated nix code", ) common.add_argument( @@ -787,10 +789,17 @@ def update_plugins(editor: Editor, args): if autocommit: from datetime import date - editor.nixpkgs_repo = git.Repo(editor.root, search_parent_directories=True) - updated = date.today().strftime('%m-%d-%Y') - commit(editor.nixpkgs_repo, f"{editor.attr_path}: updated the {updated}", [args.outfile]) + try: + repo = git.Repo(os.getcwd()) + updated = date.today().strftime('%m-%d-%Y') + print(args.outfile) + commit(repo, + f"{editor.attr_path}: updated the {updated}", [args.outfile] + ) + except git.InvalidGitRepositoryError as e: + print(f"Not in a git repository: {e}", file=sys.stderr) + sys.exit(1) if redirects: update() diff --git a/nixpkgs/maintainers/scripts/update-luarocks-packages b/nixpkgs/maintainers/scripts/update-luarocks-packages deleted file mode 100755 index 32c2b44260b3..000000000000 --- a/nixpkgs/maintainers/scripts/update-luarocks-packages +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell update-luarocks-shell.nix -i python3 - -# format: -# $ nix run nixpkgs#python3Packages.black -- update.py -# type-check: -# $ nix run nixpkgs#python3Packages.mypy -- update.py -# linted: -# $ nix run nixpkgs#python3Packages.flake8 -- --ignore E501,E265,E402 update.py - -import inspect -import os -import tempfile -import shutil -from dataclasses import dataclass -import subprocess -import csv -import logging -import textwrap -from multiprocessing.dummy import Pool - -from typing import List, Tuple, Optional -from pathlib import Path - -log = logging.getLogger() -log.addHandler(logging.StreamHandler()) - -ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))).parent.parent # type: ignore -import pluginupdate -from pluginupdate import update_plugins, FetchConfig, CleanEnvironment - -PKG_LIST = "maintainers/scripts/luarocks-packages.csv" -TMP_FILE = "$(mktemp)" -GENERATED_NIXFILE = "pkgs/development/lua-modules/generated-packages.nix" -LUAROCKS_CONFIG = "maintainers/scripts/luarocks-config.lua" - -HEADER = """/* {GENERATED_NIXFILE} is an auto-generated file -- DO NOT EDIT! -Regenerate it with: -nixpkgs$ ./maintainers/scripts/update-luarocks-packages - -You can customize the generated packages in pkgs/development/lua-modules/overrides.nix -*/ -""".format( - GENERATED_NIXFILE=GENERATED_NIXFILE -) - -FOOTER = """ -} -/* GENERATED - do not edit this file */ -""" - - -@dataclass -class LuaPlugin: - name: str - """Name of the plugin, as seen on luarocks.org""" - src: str - """address to the git repository""" - ref: Optional[str] - """git reference (branch name/tag)""" - version: Optional[str] - """Set it to pin a package """ - server: Optional[str] - """luarocks.org registers packages under different manifests. - Its value can be 'http://luarocks.org/dev' - """ - luaversion: Optional[str] - """Attribue of the lua interpreter if a package is available only for a specific lua version""" - maintainers: Optional[str] - """ Optional string listing maintainers separated by spaces""" - - @property - def normalized_name(self) -> str: - return self.name.replace(".", "-") - - -# rename Editor to LangUpdate/ EcosystemUpdater -class LuaEditor(pluginupdate.Editor): - def get_current_plugins(self): - return [] - - def load_plugin_spec(self, input_file) -> List[LuaPlugin]: - luaPackages = [] - csvfilename = input_file - log.info("Loading package descriptions from %s", csvfilename) - - with open(csvfilename, newline="") as csvfile: - reader = csv.DictReader( - csvfile, - ) - for row in reader: - # name,server,version,luaversion,maintainers - plugin = LuaPlugin(**row) - luaPackages.append(plugin) - return luaPackages - - def update(self, args): - update_plugins(self, args) - - def generate_nix(self, results: List[Tuple[LuaPlugin, str]], outfilename: str): - with tempfile.NamedTemporaryFile("w+") as f: - f.write(HEADER) - header2 = textwrap.dedent( - # header2 = inspect.cleandoc( - """ - { self, stdenv, lib, fetchurl, fetchgit, callPackage, ... } @ args: - final: prev: - { - """ - ) - f.write(header2) - for plugin, nix_expr in results: - f.write(f"{plugin.normalized_name} = {nix_expr}") - f.write(FOOTER) - f.flush() - - # if everything went fine, move the generated file to its destination - # using copy since move doesn't work across disks - shutil.copy(f.name, outfilename) - - print(f"updated {outfilename}") - - @property - def attr_path(self): - return "luaPackages" - - def get_update(self, input_file: str, outfile: str, config: FetchConfig): - _prefetch = generate_pkg_nix - - def update() -> dict: - plugin_specs = self.load_plugin_spec(input_file) - sorted_plugin_specs = sorted(plugin_specs, key=lambda v: v.name.lower()) - - try: - pool = Pool(processes=config.proc) - results = pool.map(_prefetch, sorted_plugin_specs) - finally: - pass - - self.generate_nix(results, outfile) - - redirects = {} - return redirects - - return update - - def rewrite_input(self, input_file: str, *args, **kwargs): - # vim plugin reads the file before update but that shouldn't be our case - # not implemented yet - # fieldnames = ['name', 'server', 'version', 'luaversion', 'maintainers'] - # input_file = "toto.csv" - # with open(input_file, newline='') as csvfile: - # writer = csv.DictWriter(csvfile, fieldnames=fieldnames) - # writer.writeheader() - # for row in reader: - # # name,server,version,luaversion,maintainers - # plugin = LuaPlugin(**row) - # luaPackages.append(plugin) - pass - - -def generate_pkg_nix(plug: LuaPlugin): - """ - Generate nix expression for a luarocks package - Our cache key associates "p.name-p.version" to its rockspec - """ - log.debug("Generating nix expression for %s", plug.name) - custom_env = os.environ.copy() - custom_env["LUAROCKS_CONFIG"] = LUAROCKS_CONFIG - - # we add --dev else luarocks wont find all the "scm" (=dev) versions of the - # packages - # , "--dev" - cmd = ["luarocks", "nix"] - - if plug.maintainers: - cmd.append(f"--maintainers={plug.maintainers}") - - # if plug.server == "src": - if plug.src != "": - if plug.src is None: - msg = ( - "src must be set when 'version' is set to \"src\" for package %s" - % plug.name - ) - log.error(msg) - raise RuntimeError(msg) - log.debug("Updating from source %s", plug.src) - cmd.append(plug.src) - # update the plugin from luarocks - else: - cmd.append(plug.name) - if plug.version and plug.version != "src": - cmd.append(plug.version) - - if plug.server != "src" and plug.server: - cmd.append(f"--only-server={plug.server}") - - if plug.luaversion: - cmd.append(f"--lua-version={plug.luaversion}") - - log.debug("running %s", " ".join(cmd)) - - output = subprocess.check_output(cmd, env=custom_env, text=True) - output = "callPackage(" + output.strip() + ") {};\n\n" - return (plug, output) - - -def main(): - editor = LuaEditor( - "lua", - ROOT, - "", - default_in=ROOT.joinpath(PKG_LIST), - default_out=ROOT.joinpath(GENERATED_NIXFILE), - ) - - editor.run() - - -if __name__ == "__main__": - main() - -# vim: set ft=python noet fdm=manual fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : diff --git a/nixpkgs/maintainers/scripts/update-luarocks-shell.nix b/nixpkgs/maintainers/scripts/update-luarocks-shell.nix deleted file mode 100644 index 346b0319b08c..000000000000 --- a/nixpkgs/maintainers/scripts/update-luarocks-shell.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ nixpkgs ? import ../.. { } -}: -with nixpkgs; -let - pyEnv = python3.withPackages(ps: [ ps.gitpython ]); -in -mkShell { - packages = [ - pyEnv - luarocks-nix - nix-prefetch-scripts - ]; -} diff --git a/nixpkgs/maintainers/team-list.nix b/nixpkgs/maintainers/team-list.nix index f8dbd637d77f..5a205f3cb22e 100644 --- a/nixpkgs/maintainers/team-list.nix +++ b/nixpkgs/maintainers/team-list.nix @@ -430,6 +430,7 @@ with lib.maintainers; { members = [ cleeyv ryantm + lassulus ]; scope = "Maintain Jitsi."; shortName = "Jitsi"; @@ -931,7 +932,6 @@ with lib.maintainers; { wdz = { members = [ n0emis - netali vidister johannwagner yuka |