···11-#!/usr/bin/env bash
22-33-# Process reviewers for a PR, reading line-separated usernames on stdin,
44-# returning a JSON suitable to be consumed by the API endpoint to request reviews:
55-# https://docs.github.com/en/rest/pulls/review-requests?apiVersion=2022-11-28#request-reviewers-for-a-pull-request
66-77-set -euo pipefail
88-99-log() {
1010- echo "$@" >&2
1111-}
1212-1313-if (( "$#" < 3 )); then
1414- log "Usage: $0 BASE_REPO PR_NUMBER PR_AUTHOR"
1515- exit 1
1616-fi
1717-1818-baseRepo=$1
1919-prNumber=$2
2020-prAuthor=$3
2121-2222-tmp=$(mktemp -d)
2323-trap 'rm -rf "$tmp"' exit
2424-2525-declare -A users=()
2626-while read -r handle && [[ -n "$handle" ]]; do
2727- users[${handle,,}]=
2828-done
2929-3030-# Cannot request a review from the author
3131-if [[ -v users[${prAuthor,,}] ]]; then
3232- log "One or more files are owned by the PR author, ignoring"
3333- unset 'users[${prAuthor,,}]'
3434-fi
3535-3636-gh api \
3737- -H "Accept: application/vnd.github+json" \
3838- -H "X-GitHub-Api-Version: 2022-11-28" \
3939- "/repos/$baseRepo/pulls/$prNumber/reviews" \
4040- --jq '.[].user.login' > "$tmp/already-reviewed-by"
4141-4242-# And we don't want to rerequest reviews from people who already reviewed
4343-while read -r user; do
4444- if [[ -v users[${user,,}] ]]; then
4545- log "User $user is a code owner but has already left a review, ignoring"
4646- unset 'users[${user,,}]'
4747- fi
4848-done < "$tmp/already-reviewed-by"
4949-5050-for user in "${!users[@]}"; do
5151- if ! gh api \
5252- -H "Accept: application/vnd.github+json" \
5353- -H "X-GitHub-Api-Version: 2022-11-28" \
5454- "/repos/$baseRepo/collaborators/$user" >&2; then
5555- log "User $user is not a repository collaborator, probably missed the automated invite to the maintainers team (see <https://github.com/NixOS/nixpkgs/issues/234293>), ignoring"
5656- unset 'users[$user]'
5757- fi
5858-done
5959-6060-# Turn it into a JSON for the GitHub API call to request PR reviewers
6161-jq -n \
6262- --arg users "${!users[*]}" \
6363- '{
6464- reviewers: $users | split(" "),
6565- }'
+82
ci/request-reviews/request-code-owner-reviews.sh
···11+#!/usr/bin/env bash
22+33+# Requests reviews for a PR after verifying that the base branch is correct
44+55+set -euo pipefail
66+tmp=$(mktemp -d)
77+trap 'rm -rf "$tmp"' exit
88+SCRIPT_DIR=$(dirname "$0")
99+1010+log() {
1111+ echo "$@" >&2
1212+}
1313+1414+effect() {
1515+ if [[ -n "${DRY_MODE:-}" ]]; then
1616+ log "Skipping in dry mode:" "${@@Q}"
1717+ else
1818+ "$@"
1919+ fi
2020+}
2121+2222+if (( $# < 3 )); then
2323+ log "Usage: $0 GITHUB_REPO PR_NUMBER OWNERS_FILE"
2424+ exit 1
2525+fi
2626+baseRepo=$1
2727+prNumber=$2
2828+ownersFile=$3
2929+3030+log "Fetching PR info"
3131+prInfo=$(gh api \
3232+ -H "Accept: application/vnd.github+json" \
3333+ -H "X-GitHub-Api-Version: 2022-11-28" \
3434+ "/repos/$baseRepo/pulls/$prNumber")
3535+3636+baseBranch=$(jq -r .base.ref <<< "$prInfo")
3737+log "Base branch: $baseBranch"
3838+prRepo=$(jq -r .head.repo.full_name <<< "$prInfo")
3939+log "PR repo: $prRepo"
4040+prBranch=$(jq -r .head.ref <<< "$prInfo")
4141+log "PR branch: $prBranch"
4242+prAuthor=$(jq -r .user.login <<< "$prInfo")
4343+log "PR author: $prAuthor"
4444+4545+extraArgs=()
4646+if pwdRepo=$(git rev-parse --show-toplevel 2>/dev/null); then
4747+ # Speedup for local runs
4848+ extraArgs+=(--reference-if-able "$pwdRepo")
4949+fi
5050+5151+log "Fetching Nixpkgs commit history"
5252+# We only need the commit history, not the contents, so we can do a tree-less clone using tree:0
5353+# https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/#user-content-quick-summary
5454+git clone --bare --filter=tree:0 --no-tags --origin upstream "${extraArgs[@]}" https://github.com/"$baseRepo".git "$tmp"/nixpkgs.git
5555+5656+log "Fetching the PR commit history"
5757+# Fetch the PR
5858+git -C "$tmp/nixpkgs.git" remote add fork https://github.com/"$prRepo".git
5959+# This remote config is the same as --filter=tree:0 when cloning
6060+git -C "$tmp/nixpkgs.git" config remote.fork.partialclonefilter tree:0
6161+git -C "$tmp/nixpkgs.git" config remote.fork.promisor true
6262+6363+git -C "$tmp/nixpkgs.git" fetch --no-tags fork "$prBranch"
6464+headRef=$(git -C "$tmp/nixpkgs.git" rev-parse refs/remotes/fork/"$prBranch")
6565+6666+log "Checking correctness of the base branch"
6767+if ! "$SCRIPT_DIR"/verify-base-branch.sh "$tmp/nixpkgs.git" "$headRef" "$baseRepo" "$baseBranch" "$prRepo" "$prBranch" | tee "$tmp/invalid-base-error" >&2; then
6868+ log "Posting error as comment"
6969+ if ! response=$(effect gh api \
7070+ --method POST \
7171+ -H "Accept: application/vnd.github+json" \
7272+ -H "X-GitHub-Api-Version: 2022-11-28" \
7373+ "/repos/$baseRepo/issues/$prNumber/comments" \
7474+ -F "body=@$tmp/invalid-base-error"); then
7575+ log "Failed to post the comment: $response"
7676+ fi
7777+ exit 1
7878+fi
7979+8080+log "Requesting reviews from code owners"
8181+"$SCRIPT_DIR"/get-code-owners.sh "$tmp/nixpkgs.git" "$ownersFile" "$baseBranch" "$headRef" | \
8282+ "$SCRIPT_DIR"/request-reviewers.sh "$baseRepo" "$prNumber" "$prAuthor"
+83
ci/request-reviews/request-reviewers.sh
···11+#!/usr/bin/env bash
22+33+# Request reviewers for a PR, reading line-separated usernames on stdin,
44+# filtering for valid reviewers before using the API endpoint to request reviews:
55+# https://docs.github.com/en/rest/pulls/review-requests?apiVersion=2022-11-28#request-reviewers-for-a-pull-request
66+77+set -euo pipefail
88+99+tmp=$(mktemp -d)
1010+trap 'rm -rf "$tmp"' exit
1111+1212+log() {
1313+ echo "$@" >&2
1414+}
1515+1616+effect() {
1717+ if [[ -n "${DRY_MODE:-}" ]]; then
1818+ log "Skipping in dry mode:" "${@@Q}"
1919+ else
2020+ "$@"
2121+ fi
2222+}
2323+2424+if (( "$#" < 3 )); then
2525+ log "Usage: $0 BASE_REPO PR_NUMBER PR_AUTHOR"
2626+ exit 1
2727+fi
2828+2929+baseRepo=$1
3030+prNumber=$2
3131+prAuthor=$3
3232+3333+tmp=$(mktemp -d)
3434+trap 'rm -rf "$tmp"' exit
3535+3636+declare -A users=()
3737+while read -r handle && [[ -n "$handle" ]]; do
3838+ users[${handle,,}]=
3939+done
4040+4141+# Cannot request a review from the author
4242+if [[ -v users[${prAuthor,,}] ]]; then
4343+ log "One or more files are owned by the PR author, ignoring"
4444+ unset 'users[${prAuthor,,}]'
4545+fi
4646+4747+gh api \
4848+ -H "Accept: application/vnd.github+json" \
4949+ -H "X-GitHub-Api-Version: 2022-11-28" \
5050+ "/repos/$baseRepo/pulls/$prNumber/reviews" \
5151+ --jq '.[].user.login' > "$tmp/already-reviewed-by"
5252+5353+# And we don't want to rerequest reviews from people who already reviewed
5454+while read -r user; do
5555+ if [[ -v users[${user,,}] ]]; then
5656+ log "User $user is a potential reviewer, but has already left a review, ignoring"
5757+ unset 'users[${user,,}]'
5858+ fi
5959+done < "$tmp/already-reviewed-by"
6060+6161+for user in "${!users[@]}"; do
6262+ if ! gh api \
6363+ -H "Accept: application/vnd.github+json" \
6464+ -H "X-GitHub-Api-Version: 2022-11-28" \
6565+ "/repos/$baseRepo/collaborators/$user" >&2; then
6666+ log "User $user is not a repository collaborator, probably missed the automated invite to the maintainers team (see <https://github.com/NixOS/nixpkgs/issues/234293>), ignoring"
6767+ unset 'users[$user]'
6868+ fi
6969+done
7070+7171+for user in "${!users[@]}"; do
7272+ log "Requesting review from: $user"
7373+7474+ if ! response=$(jq -n --arg user "$user" '{ reviewers: [ $user ] }' | \
7575+ effect gh api \
7676+ --method POST \
7777+ -H "Accept: application/vnd.github+json" \
7878+ -H "X-GitHub-Api-Version: 2022-11-28" \
7979+ "/repos/$baseRepo/pulls/$prNumber/requested_reviewers" \
8080+ --input -); then
8181+ log "Failed to request review from $user: $response"
8282+ fi
8383+done
-96
ci/request-reviews/request-reviews.sh
···11-#!/usr/bin/env bash
22-33-# Requests reviews for a PR after verifying that the base branch is correct
44-55-set -euo pipefail
66-tmp=$(mktemp -d)
77-trap 'rm -rf "$tmp"' exit
88-SCRIPT_DIR=$(dirname "$0")
99-1010-log() {
1111- echo "$@" >&2
1212-}
1313-1414-effect() {
1515- if [[ -n "${DRY_MODE:-}" ]]; then
1616- log "Skipping in dry mode:" "${@@Q}"
1717- else
1818- "$@"
1919- fi
2020-}
2121-2222-if (( $# < 3 )); then
2323- log "Usage: $0 GITHUB_REPO PR_NUMBER OWNERS_FILE"
2424- exit 1
2525-fi
2626-baseRepo=$1
2727-prNumber=$2
2828-ownersFile=$3
2929-3030-log "Fetching PR info"
3131-prInfo=$(gh api \
3232- -H "Accept: application/vnd.github+json" \
3333- -H "X-GitHub-Api-Version: 2022-11-28" \
3434- "/repos/$baseRepo/pulls/$prNumber")
3535-3636-baseBranch=$(jq -r .base.ref <<< "$prInfo")
3737-log "Base branch: $baseBranch"
3838-prRepo=$(jq -r .head.repo.full_name <<< "$prInfo")
3939-log "PR repo: $prRepo"
4040-prBranch=$(jq -r .head.ref <<< "$prInfo")
4141-log "PR branch: $prBranch"
4242-prAuthor=$(jq -r .user.login <<< "$prInfo")
4343-log "PR author: $prAuthor"
4444-4545-extraArgs=()
4646-if pwdRepo=$(git rev-parse --show-toplevel 2>/dev/null); then
4747- # Speedup for local runs
4848- extraArgs+=(--reference-if-able "$pwdRepo")
4949-fi
5050-5151-log "Fetching Nixpkgs commit history"
5252-# We only need the commit history, not the contents, so we can do a tree-less clone using tree:0
5353-# https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/#user-content-quick-summary
5454-git clone --bare --filter=tree:0 --no-tags --origin upstream "${extraArgs[@]}" https://github.com/"$baseRepo".git "$tmp"/nixpkgs.git
5555-5656-log "Fetching the PR commit history"
5757-# Fetch the PR
5858-git -C "$tmp/nixpkgs.git" remote add fork https://github.com/"$prRepo".git
5959-# This remote config is the same as --filter=tree:0 when cloning
6060-git -C "$tmp/nixpkgs.git" config remote.fork.partialclonefilter tree:0
6161-git -C "$tmp/nixpkgs.git" config remote.fork.promisor true
6262-6363-git -C "$tmp/nixpkgs.git" fetch --no-tags fork "$prBranch"
6464-headRef=$(git -C "$tmp/nixpkgs.git" rev-parse refs/remotes/fork/"$prBranch")
6565-6666-log "Checking correctness of the base branch"
6767-if ! "$SCRIPT_DIR"/verify-base-branch.sh "$tmp/nixpkgs.git" "$headRef" "$baseRepo" "$baseBranch" "$prRepo" "$prBranch" | tee "$tmp/invalid-base-error" >&2; then
6868- log "Posting error as comment"
6969- if ! response=$(effect gh api \
7070- --method POST \
7171- -H "Accept: application/vnd.github+json" \
7272- -H "X-GitHub-Api-Version: 2022-11-28" \
7373- "/repos/$baseRepo/issues/$prNumber/comments" \
7474- -F "body=@$tmp/invalid-base-error"); then
7575- log "Failed to post the comment: $response"
7676- fi
7777- exit 1
7878-fi
7979-8080-log "Getting code owners to request reviews from"
8181-"$SCRIPT_DIR"/get-reviewers.sh "$tmp/nixpkgs.git" "$ownersFile" "$baseBranch" "$headRef" | \
8282- "$SCRIPT_DIR"/process-reviewers.sh "$baseRepo" "$prNumber" "$prAuthor" > "$tmp/reviewers.json"
8383-8484-log "Requesting reviews from: $(<"$tmp/reviewers.json")"
8585-8686-if ! response=$(effect gh api \
8787- --method POST \
8888- -H "Accept: application/vnd.github+json" \
8989- -H "X-GitHub-Api-Version: 2022-11-28" \
9090- "/repos/$baseRepo/pulls/$prNumber/requested_reviewers" \
9191- --input "$tmp/reviewers.json"); then
9292- log "Failed to request reviews: $response"
9393- exit 1
9494-fi
9595-9696-log "Successfully requested reviews"
···125125 wantedBy = [ "multi-user.target" ];
126126127127 preStart = ''
128128- mkdir -m 710 -p /var/cron
128128+ (umask 022 && mkdir -p /var)
129129+ (umask 067 && mkdir -p /var/cron)
129130130131 # By default, allow all users to create a crontab. This
131132 # is denoted by the existence of an empty cron.deny file.
+1-1
nixos/release-combined.nix
···9999100100 (onFullSupported "nixos.tests.firewall")
101101 (onFullSupported "nixos.tests.fontconfig-default-fonts")
102102- (onSystems [ "x86_64-linux" ] "nixos.tests.gitlab") # we lack energy to really debug aarch64 here
102102+ (onFullSupported "nixos.tests.gitlab")
103103 (onFullSupported "nixos.tests.gnome")
104104 (onFullSupported "nixos.tests.gnome-xorg")
105105 (onSystems [ "x86_64-linux" ] "nixos.tests.hibernate")
···53535454 meta = with lib; {
5555 description = "C/C++ toolkit for SOAP web services and XML-based applications";
5656- homepage = "http://www.cs.fsu.edu/~engelen/soap.html";
5656+ homepage = "https://www.genivia.com/products.html";
5757 # gsoap is dual/triple licensed (see homepage for details):
5858 # 1. gSOAP Public License 1.3 (based on Mozilla Public License 1.1).
5959 # Components NOT covered by the gSOAP Public License are:
···6161 # a more conservative version of https://github.com/sagemath/sage/pull/37951
6262 ./patches/gap-element-crash.patch
63636464- # https://github.com/sagemath/sage/pull/38940, positively reviewed, to land in 10.6.beta0
6464+ # https://github.com/sagemath/sage/pull/38940, landed in 10.6.beta0
6565 (fetchpatch {
6666 name = "simplicial-sets-flaky-test.patch";
6767 url = "https://github.com/sagemath/sage/commit/1830861c5130d30b891e8c643308e1ceb91ce2b5.diff";
···7676 # should come from or be proposed to upstream. This list will probably never
7777 # be empty since dependencies update all the time.
7878 packageUpgradePatches = [
7979+ # https://github.com/sagemath/sage/pull/38887, landed in 10.6.beta0
8080+ (fetchpatch {
8181+ name = "libbraiding-1.3-update.patch";
8282+ url = "https://github.com/sagemath/sage/commit/f10a6d04599795732c1d99e2da0a4839ccdcb4f5.diff";
8383+ hash = "sha256-xB0xg8dGLnSMdFK3/B5hkI9yzI5N3lUMhPZ89lDsp3s=";
8484+ })
7985 ];
80868187 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
···73737474 meta = with lib; {
7575 description = "Terra station is the official wallet of the Terra blockchain";
7676- homepage = "https://docs.terra.money/docs/learn/terra-station/README.html";
7676+ homepage = "https://station.money/";
7777 license = licenses.isc;
7878 maintainers = [ maintainers.peterwilli ];
7979 platforms = [ "x86_64-linux" ];
···3939 prefixKey = "-prefix=";
40404141 meta = with lib; {
4242- homepage = "http://kerneis.github.io/cil/";
4242+ homepage = "https://sourceforge.net/projects/cil/";
4343 description = "Front-end for the C programming language that facilitates program analysis and transformation";
4444 license = licenses.bsd3;
4545 maintainers = [ maintainers.vbgl ];