diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-09-13 11:53:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-09-13 17:18:49 +0000 |
commit | c3e005913d59b8ad64004e60888a71816688af1f (patch) | |
tree | f65b32f0d16acaa40f2ee82ac736d150de4b6cf5 /nixpkgs/maintainers | |
parent | 1c8034da05499ca3d999f57ba1f6b235e7711ee1 (diff) | |
parent | db88608d8c811a93b74c99cfa1224952afc78200 (diff) | |
download | nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.gz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.bz2 nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.lz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.xz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.zst nixlib-c3e005913d59b8ad64004e60888a71816688af1f.zip |
Merge commit 'db88608d8c811a93b74c99cfa1224952afc78200'
Conflicts: nixpkgs/nixos/modules/config/update-users-groups.pl
Diffstat (limited to 'nixpkgs/maintainers')
-rw-r--r-- | nixpkgs/maintainers/maintainer-list.nix | 82 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/db-to-md.sh | 88 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/doc/escape-code-markup.py | 97 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/doc/replace-xrefs-by-empty-links.py | 32 | ||||
-rw-r--r-- | nixpkgs/maintainers/scripts/doc/unknown-code-language.lua | 12 | ||||
-rw-r--r-- | nixpkgs/maintainers/scripts/luarocks-packages.csv | 2 | ||||
-rwxr-xr-x | nixpkgs/maintainers/scripts/update.nix | 4 | ||||
-rw-r--r-- | nixpkgs/maintainers/team-list.nix | 9 |
8 files changed, 316 insertions, 10 deletions
diff --git a/nixpkgs/maintainers/maintainer-list.nix b/nixpkgs/maintainers/maintainer-list.nix index 09c65a77fde0..628a42ce1f00 100644 --- a/nixpkgs/maintainers/maintainer-list.nix +++ b/nixpkgs/maintainers/maintainer-list.nix @@ -354,6 +354,12 @@ githubId = 4732885; name = "Ivan Jager"; }; + airwoodix = { + email = "airwoodix@posteo.me"; + github = "airwoodix"; + githubId = 44871469; + name = "Etienne Wodey"; + }; ajs124 = { email = "nix@ajs124.de"; github = "ajs124"; @@ -532,6 +538,16 @@ fingerprint = "B422 CFB1 C9EF 73F7 E1E2 698D F53E 3233 42F7 A6D3A"; }]; }; + alyaeanyx = { + email = "alexandra.hollmeier@mailbox.org"; + github = "alyaeanyx"; + githubId = 74795488; + name = "Alexandra Hollmeier"; + keys = [{ + longkeyid = "rsa3072/0x87D1AADCD25B8DEE"; + fingerprint = "1F73 8879 5E5A 3DFC E2B3 FA32 87D1 AADC D25B 8DEE"; + }]; + }; amanjeev = { email = "aj@amanjeev.com"; github = "amanjeev"; @@ -1520,12 +1536,6 @@ githubId = 355401; name = "Brian Hicks"; }; - bricewge = { - email = "bricewge@gmail.com"; - github = "bricewge"; - githubId = 5525646; - name = "Brice Waegeneire"; - }; Br1ght0ne = { email = "brightone@protonmail.com"; github = "Br1ght0ne"; @@ -1683,6 +1693,12 @@ githubId = 7435854; name = "Victor Calvert"; }; + cameronnemo = { + email = "cnemo@tutanota.com"; + github = "cameronnemo"; + githubId = 3212452; + name = "Cameron Nemo"; + }; campadrenalin = { email = "campadrenalin@gmail.com"; github = "campadrenalin"; @@ -2269,6 +2285,12 @@ githubId = 1382175; name = "Oliver Matthews"; }; + cyounkins = { + name = "Craig Younkins"; + email = "cyounkins@gmail.com"; + github = "cyounkins"; + githubId = 346185; + }; cypherpunk2140 = { email = "stefan.mihaila@pm.me"; github = "stefan-mihaila"; @@ -5490,6 +5512,12 @@ githubId = 66669; name = "Jeff Zellner"; }; + k4leg = { + name = "k4leg"; + email = "python.bogdan@gmail.com"; + github = "k4leg"; + githubId = 39882583; + }; kaction = { name = "Dmitry Bogatov"; email = "KAction@disroot.org"; @@ -7683,6 +7711,12 @@ githubId = 2590830; name = "Sage Raflik"; }; + neosimsim = { + email = "me@abn.sh"; + github = "neosimsim"; + githubId = 1771772; + name = "Alexander Ben Nasrallah"; + }; nequissimus = { email = "tim@nequissimus.com"; github = "nequissimus"; @@ -8806,6 +8840,12 @@ githubId = 33375; name = "Peter Sanford"; }; + pshirshov = { + email = "pshirshov@eml.cc"; + github = "pshirshov"; + githubId = 295225; + name = "Pavel Shirshov"; + }; psibi = { email = "sibi@psibi.in"; github = "psibi"; @@ -9560,6 +9600,12 @@ github = "s1341"; githubId = 5682183; }; + samalws = { + email = "sam@samalws.com"; + name = "Sam Alws"; + github = "samalws"; + githubId = 20981725; + }; samb96 = { email = "samb96@gmail.com"; github = "samb96"; @@ -9594,6 +9640,12 @@ githubId = 115821; name = "Sam Rose"; }; + samuela = { + email = "skainsworth@gmail.com"; + github = "samuela"; + githubId = 226872; + name = "Samuel Ainsworth"; + }; samueldr = { email = "samuel@dionne-riel.com"; github = "samueldr"; @@ -11064,6 +11116,12 @@ githubId = 10110; name = "Travis B. Hartwell"; }; + travisdavis-ops = { + email = "travisdavismedia@gmail.com"; + github = "travisdavis-ops"; + githubId = 52011418; + name = "Travis Davis"; + }; TredwellGit = { email = "tredwell@tutanota.com"; github = "TredwellGit"; @@ -11321,10 +11379,14 @@ name = "Jos van den Oever"; }; vanilla = { - email = "neko@hydev.org"; + email = "osu_vanilla@126.com"; github = "VergeDX"; githubId = 25173827; name = "Vanilla"; + keys = [{ + longkeyid = "rsa4096/0x4DFA2BDD7305E739"; + fingerprint = "5C16 5178 7DE2 EE5A AF98 3EA3 4DFA 2BDD 7305 E739"; + }]; }; vanschelven = { email = "klaas@vanschelven.com"; @@ -11776,6 +11838,12 @@ githubId = 3992240; name = "Elijah Rum"; }; + x3ro = { + name = "^x3ro"; + email = "nix@x3ro.dev"; + github = "x3rAx"; + githubId = 2268851; + }; xaverdh = { email = "hoe.dom@gmx.de"; github = "xaverdh"; diff --git a/nixpkgs/maintainers/scripts/db-to-md.sh b/nixpkgs/maintainers/scripts/db-to-md.sh new file mode 100755 index 000000000000..01357d1e2412 --- /dev/null +++ b/nixpkgs/maintainers/scripts/db-to-md.sh @@ -0,0 +1,88 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=. -i bash -p pandoc + +# This script is temporarily needed while we transition the manual to +# CommonMark. It converts DocBook files into our CommonMark flavour. + +debug= +files=() + +while [ "$#" -gt 0 ]; do + i="$1"; shift 1 + case "$i" in + --debug) + debug=1 + ;; + *) + files+=("$i") + ;; + esac +done + +echo "WARNING: This is an experimental script and might not preserve all formatting." > /dev/stderr +echo "Please report any issues you discover." > /dev/stderr + +outExtension="md" +if [[ $debug ]]; then + outExtension="json" +fi + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +# NOTE: Keep in sync with Nixpkgs manual (/doc/Makefile). +# TODO: Remove raw-attribute when we can get rid of DocBook altogether. +pandoc_commonmark_enabled_extensions=+attributes+fenced_divs+footnotes+bracketed_spans+definition_lists+pipe_tables+raw_attribute +targetLang="commonmark${pandoc_commonmark_enabled_extensions}+smart" +if [[ $debug ]]; then + targetLang=json +fi +pandoc_flags=( + # Not needed: + # - diagram-generator.lua (we do not support that in NixOS manual to limit dependencies) + # - media extraction (was only required for diagram generator) + # - myst-reader/roles.lua (only relevant for MyST → DocBook) + # - link-unix-man-references.lua (links should only be added to display output) + # - docbook-writer/rst-roles.lua (only relevant for → DocBook) + # - docbook-writer/labelless-link-is-xref.lua (only relevant for → DocBook) + "--lua-filter=$DIR/../../doc/build-aux/pandoc-filters/docbook-reader/citerefentry-to-rst-role.lua" + "--lua-filter=$DIR/../../doc/build-aux/pandoc-filters/myst-writer/roles.lua" + "--lua-filter=$DIR/doc/unknown-code-language.lua" + -f docbook + -t "$targetLang" + --tab-stop=2 + --wrap=none +) + +for file in "${files[@]}"; do + if [[ ! -f "$file" ]]; then + echo "db-to-md.sh: $file does not exist" > /dev/stderr + exit 1 + else + rootElement=$(xmllint --xpath 'name(//*)' "$file") + + if [[ $rootElement = chapter ]]; then + extension=".chapter.$outExtension" + elif [[ $rootElement = section ]]; then + extension=".section.$outExtension" + else + echo "db-to-md.sh: $file contains an unsupported root element $rootElement" > /dev/stderr + exit 1 + fi + + outFile="${file%".section.xml"}" + outFile="${outFile%".chapter.xml"}" + outFile="${outFile%".xml"}$extension" + temp1=$(mktemp) + $DIR/doc/escape-code-markup.py "$file" "$temp1" + if [[ $debug ]]; then + echo "Converted $file to $temp1" > /dev/stderr + fi + temp2=$(mktemp) + $DIR/doc/replace-xrefs-by-empty-links.py "$temp1" "$temp2" + if [[ $debug ]]; then + echo "Converted $temp1 to $temp2" > /dev/stderr + fi + pandoc "$temp2" -o "$outFile" "${pandoc_flags[@]}" + echo "Converted $file to $outFile" > /dev/stderr + fi +done diff --git a/nixpkgs/maintainers/scripts/doc/escape-code-markup.py b/nixpkgs/maintainers/scripts/doc/escape-code-markup.py new file mode 100755 index 000000000000..015435b698e6 --- /dev/null +++ b/nixpkgs/maintainers/scripts/doc/escape-code-markup.py @@ -0,0 +1,97 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=channel:nixos-unstable -i python3 -p python3 -p python3.pkgs.lxml + +""" +Pandoc will strip any markup within code elements so +let’s escape them so that they can be handled manually. +""" + +import lxml.etree as ET +import re +import sys + +def replace_element_by_text(el: ET.Element, text: str) -> None: + """ + Author: bernulf + Source: https://stackoverflow.com/a/10520552/160386 + SPDX-License-Identifier: CC-BY-SA-3.0 + """ + text = text + (el.tail or "") + parent = el.getparent() + if parent is not None: + previous = el.getprevious() + if previous is not None: + previous.tail = (previous.tail or "") + text + else: + parent.text = (parent.text or "") + text + parent.remove(el) + +DOCBOOK_NS = "http://docbook.org/ns/docbook" + +# List of elements that pandoc’s DocBook reader strips markup from. +# https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Readers/DocBook.hs +code_elements = [ + # CodeBlock + "literallayout", + "screen", + "programlisting", + # Code (inline) + "classname", + "code", + "filename", + "envar", + "literal", + "computeroutput", + "prompt", + "parameter", + "option", + "markup", + "wordasword", + "command", + "varname", + "function", + "type", + "symbol", + "constant", + "userinput", + "systemitem", +] + +XMLNS_REGEX = re.compile(r'\s+xmlns(?::[^=]+)?="[^"]*"') +ROOT_ELEMENT_REGEX = re.compile(r'^\s*<[^>]+>') + +def remove_xmlns(match: re.Match) -> str: + """ + Removes xmlns attributes. + + Expects a match containing an opening tag. + """ + return XMLNS_REGEX.sub('', match.group(0)) + +if __name__ == '__main__': + assert len(sys.argv) >= 3, "usage: escape-code-markup.py <input> <output>" + + tree = ET.parse(sys.argv[1]) + name_predicate = " or ".join([f"local-name()='{el}'" for el in code_elements]) + + for markup in tree.xpath(f"//*[({name_predicate}) and namespace-uri()='{DOCBOOK_NS}']/*"): + text = ET.tostring(markup, encoding=str) + + # tostring adds xmlns attributes to the element we want to stringify + # as if it was supposed to be usable standalone. + # We are just converting it to CDATA so we do not care. + # Let’s strip the namespace declarations to keep the code clean. + # + # Note that this removes even namespaces that were potentially + # in the original file. Though, that should be very rare – + # most of the time, we will stringify empty DocBook elements + # like <xref> or <co> or, at worst, <link> with xlink:href attribute. + # + # Also note that the regex expects the root element to be first + # thing in the string. But that should be fine, the tostring method + # does not produce XML declaration or doctype by default. + text = ROOT_ELEMENT_REGEX.sub(remove_xmlns, text) + + replace_element_by_text(markup, text) + + tree.write(sys.argv[2]) diff --git a/nixpkgs/maintainers/scripts/doc/replace-xrefs-by-empty-links.py b/nixpkgs/maintainers/scripts/doc/replace-xrefs-by-empty-links.py new file mode 100755 index 000000000000..2006ef897f7a --- /dev/null +++ b/nixpkgs/maintainers/scripts/doc/replace-xrefs-by-empty-links.py @@ -0,0 +1,32 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=channel:nixos-unstable -i python3 -p python3 -p python3.pkgs.lxml + +""" +Pandoc will try to resolve xrefs and replace them with regular links. +let’s replace them with links with empty labels which MyST +and our pandoc filters recognize as cross-references. +""" + +import lxml.etree as ET +import sys + +XLINK_NS = "http://www.w3.org/1999/xlink" + +ns = { + "db": "http://docbook.org/ns/docbook", +} + + +if __name__ == '__main__': + assert len(sys.argv) >= 3, "usage: replace-xrefs-by-empty-links.py <input> <output>" + + tree = ET.parse(sys.argv[1]) + for xref in tree.findall(".//db:xref", ns): + text = ET.tostring(xref, encoding=str) + parent = xref.getparent() + link = parent.makeelement('link') + target_name = xref.get("linkend") + link.set(f"{{{XLINK_NS}}}href", f"#{target_name}") + parent.replace(xref, link) + + tree.write(sys.argv[2]) diff --git a/nixpkgs/maintainers/scripts/doc/unknown-code-language.lua b/nixpkgs/maintainers/scripts/doc/unknown-code-language.lua new file mode 100644 index 000000000000..85d8df4690ba --- /dev/null +++ b/nixpkgs/maintainers/scripts/doc/unknown-code-language.lua @@ -0,0 +1,12 @@ +--[[ +Adds “unknown” class to CodeBlock AST nodes without any classes. + +This will cause Pandoc to use fenced code block, which we prefer. +]] + +function CodeBlock(elem) + if #elem.classes == 0 then + elem.classes:insert('unknown') + return elem + end +end diff --git a/nixpkgs/maintainers/scripts/luarocks-packages.csv b/nixpkgs/maintainers/scripts/luarocks-packages.csv index 1cb6a83d42ae..8cce4049e749 100644 --- a/nixpkgs/maintainers/scripts/luarocks-packages.csv +++ b/nixpkgs/maintainers/scripts/luarocks-packages.csv @@ -75,7 +75,7 @@ mediator_lua,,,,,, mpack,,,,,, moonscript,,,,,,arobyn nvim-client,https://github.com/neovim/lua-client.git,,,,, -penlight,https://github.com/Tieske/Penlight.git,,,,, +penlight,https://github.com/lunarmodules/Penlight.git,,,,,alerque plenary.nvim,https://github.com/nvim-lua/plenary.nvim.git,,,,lua5_1, rapidjson,https://github.com/xpol/lua-rapidjson.git,,,,, readline,,,,,, diff --git a/nixpkgs/maintainers/scripts/update.nix b/nixpkgs/maintainers/scripts/update.nix index 7435cf64425c..d881d68301ba 100755 --- a/nixpkgs/maintainers/scripts/update.nix +++ b/nixpkgs/maintainers/scripts/update.nix @@ -103,7 +103,7 @@ let pathContent = lib.attrByPath prefix null pkgs; in if pathContent == null then - builtins.throw "Attribute path `${path}` does not exists." + builtins.throw "Attribute path `${path}` does not exist." else packagesWithPath prefix (path: pkg: builtins.hasAttr "updateScript" pkg) pathContent; @@ -115,7 +115,7 @@ let package = lib.attrByPath (lib.splitString "." path) null pkgs; in if package == null then - builtins.throw "Package with an attribute name `${path}` does not exists." + builtins.throw "Package with an attribute name `${path}` does not exist." else if ! builtins.hasAttr "updateScript" package then builtins.throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined." else diff --git a/nixpkgs/maintainers/team-list.nix b/nixpkgs/maintainers/team-list.nix index a86af02d2357..df0c9ce7cf61 100644 --- a/nixpkgs/maintainers/team-list.nix +++ b/nixpkgs/maintainers/team-list.nix @@ -178,6 +178,15 @@ with lib.maintainers; { scope = "Maintain the ecosystem around Matrix, a decentralized messenger."; }; + openstack = { + members = [ + angustrau + superherointj + SuperSandro2000 + ]; + scope = "Maintain the ecosystem around OpenStack"; + }; + pantheon = { members = [ davidak |