Skip to content

Commit b9f2c51

Browse files
authored
Merge pull request #293 from DeterminateSystems/sync-2.33.0
Sync with upstream 2.33.0
2 parents 35d674b + 90e792a commit b9f2c51

File tree

763 files changed

+22745
-9034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

763 files changed

+22745
-9034
lines changed

.coderabbit.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
# Disable CodeRabbit auto-review to prevent verbose comments on PRs.
3+
# When enabled: false, CodeRabbit won't attempt reviews and won't post
4+
# "Review skipped" or other automated comments.
5+
reviews:
6+
auto_review:
7+
enabled: false
8+
review_status: false
9+
high_level_summary: false
10+
poem: false
11+
sequence_diagrams: false
12+
changed_files_summary: false
13+
tools:
14+
github-checks:
15+
enabled: false
16+
chat:
17+
art: false
18+
auto_reply: false

.github/actions/install-nix-action/action.yaml

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,29 @@ inputs:
44
dogfood:
55
description: "Whether to use Nix installed from the latest artifact from master branch"
66
required: true # Be explicit about the fact that we are using unreleased artifacts
7+
experimental-installer:
8+
description: "Whether to use the experimental installer to install Nix"
9+
default: false
10+
experimental-installer-version:
11+
description: "Version of the experimental installer to use. If `latest`, the newest artifact from the default branch is used."
12+
# TODO: This should probably be pinned to a release after https://github.com/NixOS/experimental-nix-installer/pull/49 lands in one
13+
default: "latest"
714
extra_nix_config:
815
description: "Gets appended to `/etc/nix/nix.conf` if passed."
916
install_url:
1017
description: "URL of the Nix installer"
1118
required: false
12-
default: "https://releases.nixos.org/nix/nix-2.30.2/install"
19+
default: "https://releases.nixos.org/nix/nix-2.32.1/install"
20+
tarball_url:
21+
description: "URL of the Nix tarball to use with the experimental installer"
22+
required: false
1323
github_token:
1424
description: "Github token"
1525
required: true
26+
use_cache:
27+
description: "Whether to setup magic-nix-cache"
28+
default: true
29+
required: false
1630
runs:
1731
using: "composite"
1832
steps:
@@ -37,14 +51,81 @@ runs:
3751
3852
gh run download "$RUN_ID" --repo "$DOGFOOD_REPO" -n "$INSTALLER_ARTIFACT" -D "$INSTALLER_DOWNLOAD_DIR"
3953
echo "installer-path=file://$INSTALLER_DOWNLOAD_DIR" >> "$GITHUB_OUTPUT"
54+
TARBALL_PATH="$(find "$INSTALLER_DOWNLOAD_DIR" -name 'nix*.tar.xz' -print | head -n 1)"
55+
echo "tarball-path=file://$TARBALL_PATH" >> "$GITHUB_OUTPUT"
4056
4157
echo "::notice ::Dogfooding Nix installer from master (https://github.com/$DOGFOOD_REPO/actions/runs/$RUN_ID)"
4258
env:
4359
GH_TOKEN: ${{ inputs.github_token }}
4460
DOGFOOD_REPO: "NixOS/nix"
61+
- name: "Gather system info for experimental installer"
62+
shell: bash
63+
if: ${{ inputs.experimental-installer == 'true' }}
64+
run: |
65+
echo "::notice Using experimental installer from $EXPERIMENTAL_INSTALLER_REPO (https://github.com/$EXPERIMENTAL_INSTALLER_REPO)"
66+
67+
if [ "$RUNNER_OS" == "Linux" ]; then
68+
EXPERIMENTAL_INSTALLER_SYSTEM="linux"
69+
echo "EXPERIMENTAL_INSTALLER_SYSTEM=$EXPERIMENTAL_INSTALLER_SYSTEM" >> "$GITHUB_ENV"
70+
elif [ "$RUNNER_OS" == "macOS" ]; then
71+
EXPERIMENTAL_INSTALLER_SYSTEM="darwin"
72+
echo "EXPERIMENTAL_INSTALLER_SYSTEM=$EXPERIMENTAL_INSTALLER_SYSTEM" >> "$GITHUB_ENV"
73+
else
74+
echo "::error ::Unsupported RUNNER_OS: $RUNNER_OS"
75+
exit 1
76+
fi
77+
78+
if [ "$RUNNER_ARCH" == "X64" ]; then
79+
EXPERIMENTAL_INSTALLER_ARCH=x86_64
80+
echo "EXPERIMENTAL_INSTALLER_ARCH=$EXPERIMENTAL_INSTALLER_ARCH" >> "$GITHUB_ENV"
81+
elif [ "$RUNNER_ARCH" == "ARM64" ]; then
82+
EXPERIMENTAL_INSTALLER_ARCH=aarch64
83+
echo "EXPERIMENTAL_INSTALLER_ARCH=$EXPERIMENTAL_INSTALLER_ARCH" >> "$GITHUB_ENV"
84+
else
85+
echo "::error ::Unsupported RUNNER_ARCH: $RUNNER_ARCH"
86+
exit 1
87+
fi
88+
89+
echo "EXPERIMENTAL_INSTALLER_ARTIFACT=nix-installer-$EXPERIMENTAL_INSTALLER_ARCH-$EXPERIMENTAL_INSTALLER_SYSTEM" >> "$GITHUB_ENV"
90+
env:
91+
EXPERIMENTAL_INSTALLER_REPO: "NixOS/experimental-nix-installer"
92+
- name: "Download latest experimental installer"
93+
shell: bash
94+
id: download-latest-experimental-installer
95+
if: ${{ inputs.experimental-installer == 'true' && inputs.experimental-installer-version == 'latest' }}
96+
run: |
97+
RUN_ID=$(gh run list --repo "$EXPERIMENTAL_INSTALLER_REPO" --workflow ci.yml --branch main --status success --json databaseId --jq ".[0].databaseId")
98+
99+
EXPERIMENTAL_INSTALLER_DOWNLOAD_DIR="$GITHUB_WORKSPACE/$EXPERIMENTAL_INSTALLER_ARTIFACT"
100+
mkdir -p "$EXPERIMENTAL_INSTALLER_DOWNLOAD_DIR"
101+
102+
gh run download "$RUN_ID" --repo "$EXPERIMENTAL_INSTALLER_REPO" -n "$EXPERIMENTAL_INSTALLER_ARTIFACT" -D "$EXPERIMENTAL_INSTALLER_DOWNLOAD_DIR"
103+
# Executable permissions are lost in artifacts
104+
find $EXPERIMENTAL_INSTALLER_DOWNLOAD_DIR -type f -exec chmod +x {} +
105+
echo "installer-path=$EXPERIMENTAL_INSTALLER_DOWNLOAD_DIR" >> "$GITHUB_OUTPUT"
106+
env:
107+
GH_TOKEN: ${{ inputs.github_token }}
108+
EXPERIMENTAL_INSTALLER_REPO: "NixOS/experimental-nix-installer"
45109
- uses: cachix/install-nix-action@c134e4c9e34bac6cab09cf239815f9339aaaf84e # v31.5.1
110+
if: ${{ inputs.experimental-installer != 'true' }}
46111
with:
47112
# Ternary operator in GHA: https://www.github.com/actions/runner/issues/409#issuecomment-752775072
48113
install_url: ${{ inputs.dogfood == 'true' && format('{0}/install', steps.download-nix-installer.outputs.installer-path) || inputs.install_url }}
49114
install_options: ${{ inputs.dogfood == 'true' && format('--tarball-url-prefix {0}', steps.download-nix-installer.outputs.installer-path) || '' }}
50115
extra_nix_config: ${{ inputs.extra_nix_config }}
116+
- uses: DeterminateSystems/nix-installer-action@786fff0690178f1234e4e1fe9b536e94f5433196 # v20
117+
if: ${{ inputs.experimental-installer == 'true' }}
118+
with:
119+
diagnostic-endpoint: ""
120+
# TODO: It'd be nice to use `artifacts.nixos.org` for both of these, maybe through an `/experimental-installer/latest` endpoint? or `/commit/<hash>`?
121+
local-root: ${{ inputs.experimental-installer-version == 'latest' && steps.download-latest-experimental-installer.outputs.installer-path || '' }}
122+
source-url: ${{ inputs.experimental-installer-version != 'latest' && 'https://artifacts.nixos.org/experimental-installer/tag/${{ inputs.experimental-installer-version }}/${{ env.EXPERIMENTAL_INSTALLER_ARTIFACT }}' || '' }}
123+
nix-package-url: ${{ inputs.dogfood == 'true' && steps.download-nix-installer.outputs.tarball-path || (inputs.tarball_url || '') }}
124+
extra-conf: ${{ inputs.extra_nix_config }}
125+
- uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
126+
if: ${{ inputs.use_cache == 'true' }}
127+
with:
128+
diagnostic-endpoint: ''
129+
use-flakehub: false
130+
use-gha-cache: true
131+
source-revision: 92d9581367be2233c2d5714a2640e1339f4087d8 # main

.github/workflows/backport.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types: [closed, labeled]
5+
permissions:
6+
contents: read
7+
jobs:
8+
backport:
9+
name: Backport Pull Request
10+
permissions:
11+
# for korthout/backport-action
12+
contents: write
13+
pull-requests: write
14+
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
15+
runs-on: ubuntu-24.04-arm
16+
steps:
17+
- name: Generate GitHub App token
18+
id: generate-token
19+
uses: actions/create-github-app-token@v2
20+
with:
21+
app-id: ${{ vars.CI_APP_ID }}
22+
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
23+
- uses: actions/checkout@v6
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
# required to find all branches
27+
fetch-depth: 0
28+
- name: Create backport PRs
29+
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
30+
id: backport
31+
with:
32+
# Config README: https://github.com/korthout/backport-action#backport-action
33+
github_token: ${{ steps.generate-token.outputs.token }}
34+
github_workspace: ${{ github.workspace }}
35+
auto_merge_enabled: true
36+
pull_description: |-
37+
Automatic backport to `${target_branch}`, triggered by a label in #${pull_number}.

.mergify.yml

Lines changed: 0 additions & 174 deletions
This file was deleted.

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.32.4
1+
2.33.0

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ The underlying source files are located in [`doc/manual/source`](./doc/manual/so
9494
For small changes you can [use GitHub to edit these files](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files)
9595
For larger changes see the [Nix reference manual](https://nix.dev/manual/nix/development/development/contributing.html).
9696
97+
You're encouraged to add line breaks at semantic boundaries, per [sembr](https://sembr.org).
98+
9799
## Getting help
98100
99101
Whenever you're stuck or do not know how to proceed, you can always ask for help.

0 commit comments

Comments
 (0)