Skip to content

Commit 653d701

Browse files
authored
Merge branch 'master' into flake_show_attr
2 parents ac9d2a5 + 1f2a994 commit 653d701

File tree

466 files changed

+11412
-3004
lines changed

Some content is hidden

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

466 files changed

+11412
-3004
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: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ inputs:
1616
install_url:
1717
description: "URL of the Nix installer"
1818
required: false
19-
default: "https://releases.nixos.org/nix/nix-2.30.2/install"
19+
default: "https://releases.nixos.org/nix/nix-2.32.1/install"
2020
tarball_url:
2121
description: "URL of the Nix tarball to use with the experimental installer"
2222
required: false
2323
github_token:
2424
description: "Github token"
2525
required: true
26+
use_cache:
27+
description: "Whether to setup magic-nix-cache"
28+
default: true
29+
required: false
2630
runs:
2731
using: "composite"
2832
steps:
@@ -118,3 +122,10 @@ runs:
118122
source-url: ${{ inputs.experimental-installer-version != 'latest' && 'https://artifacts.nixos.org/experimental-installer/tag/${{ inputs.experimental-installer-version }}/${{ env.EXPERIMENTAL_INSTALLER_ARTIFACT }}' || '' }}
119123
nix-package-url: ${{ inputs.dogfood == 'true' && steps.download-nix-installer.outputs.tarball-path || (inputs.tarball_url || '') }}
120124
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/ci.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
default: true
1515
type: boolean
1616

17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
20+
1721
permissions: read-all
1822

1923
jobs:
@@ -29,6 +33,7 @@ jobs:
2933
extra_nix_config:
3034
experimental-features = nix-command flakes
3135
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
use_cache: false
3237
- run: nix flake show --all-systems --json
3338

3439
pre-commit-checks:
@@ -41,7 +46,6 @@ jobs:
4146
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
4247
extra_nix_config: experimental-features = nix-command flakes
4348
github_token: ${{ secrets.GITHUB_TOKEN }}
44-
- uses: DeterminateSystems/magic-nix-cache-action@main
4549
- run: ./ci/gha/tests/pre-commit-checks
4650

4751
basic-checks:
@@ -92,7 +96,6 @@ jobs:
9296
dogfood: ${{ github.event_name == 'workflow_dispatch' && inputs.dogfood || github.event_name != 'workflow_dispatch' }}
9397
# The sandbox would otherwise be disabled by default on Darwin
9498
extra_nix_config: "sandbox = true"
95-
- uses: DeterminateSystems/magic-nix-cache-action@main
9699
# Since ubuntu 22.30, unprivileged usernamespaces are no longer allowed to map to the root user:
97100
# https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces
98101
- run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
@@ -122,13 +125,13 @@ jobs:
122125
cat coverage-reports/index.txt >> $GITHUB_STEP_SUMMARY
123126
if: ${{ matrix.instrumented }}
124127
- name: Upload coverage reports
125-
uses: actions/upload-artifact@v4
128+
uses: actions/upload-artifact@v5
126129
with:
127130
name: coverage-reports
128131
path: coverage-reports/
129132
if: ${{ matrix.instrumented }}
130133
- name: Upload installer tarball
131-
uses: actions/upload-artifact@v4
134+
uses: actions/upload-artifact@v5
132135
with:
133136
name: installer-${{matrix.os}}
134137
path: out/*
@@ -161,7 +164,7 @@ jobs:
161164
steps:
162165
- uses: actions/checkout@v5
163166
- name: Download installer tarball
164-
uses: actions/download-artifact@v5
167+
uses: actions/download-artifact@v6
165168
with:
166169
name: installer-${{matrix.os}}
167170
path: out
@@ -171,7 +174,7 @@ jobs:
171174
echo "installer-url=file://$GITHUB_WORKSPACE/out" >> "$GITHUB_OUTPUT"
172175
TARBALL_PATH="$(find "$GITHUB_WORKSPACE/out" -name 'nix*.tar.xz' -print | head -n 1)"
173176
echo "tarball-path=file://$TARBALL_PATH" >> "$GITHUB_OUTPUT"
174-
- uses: cachix/install-nix-action@v31
177+
- uses: cachix/install-nix-action@7ec16f2c061ab07b235a7245e06ed46fe9a1cab6 # v31.8.3
175178
if: ${{ !matrix.experimental-installer }}
176179
with:
177180
install_url: ${{ format('{0}/install', steps.installer-tarball-url.outputs.installer-url) }}
@@ -227,12 +230,13 @@ jobs:
227230
- uses: actions/checkout@v5
228231
with:
229232
fetch-depth: 0
230-
- uses: cachix/install-nix-action@v31
233+
- uses: ./.github/actions/install-nix-action
231234
with:
232-
install_url: https://releases.nixos.org/nix/nix-2.20.3/install
233-
- uses: DeterminateSystems/magic-nix-cache-action@main
234-
- run: echo NIX_VERSION="$(nix --experimental-features 'nix-command flakes' eval .\#nix.version | tr -d \")" >> $GITHUB_ENV
235-
- run: nix --experimental-features 'nix-command flakes' build .#dockerImage -L
235+
dogfood: false
236+
extra_nix_config: |
237+
experimental-features = flakes nix-command
238+
- run: echo NIX_VERSION="$(nix eval .\#nix.version | tr -d \")" >> $GITHUB_ENV
239+
- run: nix build .#dockerImage -L
236240
- run: docker load -i ./result/image.tar.gz
237241
- run: docker tag nix:$NIX_VERSION ${{ secrets.DOCKERHUB_USERNAME }}/nix:$NIX_VERSION
238242
- run: docker tag nix:$NIX_VERSION ${{ secrets.DOCKERHUB_USERNAME }}/nix:master
@@ -289,7 +293,6 @@ jobs:
289293
extra_nix_config:
290294
experimental-features = nix-command flakes
291295
github_token: ${{ secrets.GITHUB_TOKEN }}
292-
- uses: DeterminateSystems/magic-nix-cache-action@main
293296
- run: nix build -L --out-link ./new-nix && PATH=$(pwd)/new-nix/bin:$PATH MAX_FLAKES=25 flake-regressions/eval-all.sh
294297

295298
profile_build:
@@ -310,7 +313,6 @@ jobs:
310313
extra_nix_config: |
311314
experimental-features = flakes nix-command ca-derivations impure-derivations
312315
max-jobs = 1
313-
- uses: DeterminateSystems/magic-nix-cache-action@main
314316
- run: |
315317
nix build -L --file ./ci/gha/profile-build buildTimeReport --out-link build-time-report.md
316318
cat build-time-report.md >> $GITHUB_STEP_SUMMARY

ci/gha/tests/default.nix

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,29 @@ rec {
107107
};
108108
};
109109

110+
disable =
111+
let
112+
inherit (pkgs.stdenv) hostPlatform;
113+
in
114+
args@{
115+
pkgName,
116+
testName,
117+
test,
118+
}:
119+
lib.any (b: b) [
120+
# FIXME: Nix manual is impure and does not produce all settings on darwin
121+
(hostPlatform.isDarwin && pkgName == "nix-manual" && testName == "linkcheck")
122+
];
123+
110124
componentTests =
111125
(lib.concatMapAttrs (
112126
pkgName: pkg:
113-
lib.concatMapAttrs (testName: test: {
114-
"${componentTestsPrefix}${pkgName}-${testName}" = test;
115-
}) (pkg.tests or { })
127+
lib.concatMapAttrs (
128+
testName: test:
129+
lib.optionalAttrs (!disable { inherit pkgName testName test; }) {
130+
"${componentTestsPrefix}${pkgName}-${testName}" = test;
131+
}
132+
) (pkg.tests or { })
116133
) nixComponentsInstrumented)
117134
// lib.optionalAttrs (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) {
118135
"${componentTestsPrefix}nix-functional-tests" = nixComponentsInstrumented.nix-functional-tests;

doc/manual/anchors.jq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
def transform_anchors_html:
6-
. | gsub($empty_anchor_regex; "<a name=\"" + .anchor + "\"></a>")
6+
. | gsub($empty_anchor_regex; "<a id=\"" + .anchor + "\"></a>")
77
| gsub($anchor_regex; "<a href=\"#" + .anchor + "\" id=\"" + .anchor + "\">" + .text + "</a>");
88

99

doc/manual/book.toml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ additional-css = ["custom.css"]
77
additional-js = ["redirects.js"]
88
edit-url-template = "https://github.com/NixOS/nix/tree/master/doc/manual/{path}"
99
git-repository-url = "https://github.com/NixOS/nix"
10+
mathjax-support = true
1011

1112
# Handles replacing @docroot@ with a path to ./source relative to that markdown file,
1213
# {{#include handlebars}}, and the @generated@ syntax used within these. it mostly

doc/manual/generate-store-types.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ let
2424
in
2525
concatStringsSep "\n" (map showEntry storesList);
2626

27-
"index.md" =
28-
replaceStrings [ "@store-types@" ] [ index ]
29-
(readFile ./source/store/types/index.md.in);
27+
"index.md" = replaceStrings [ "@store-types@" ] [ index ] (
28+
readFile ./source/store/types/index.md.in
29+
);
3030

3131
tableOfContents =
3232
let

doc/manual/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ manual = custom_target(
9292
(cd @2@; RUST_LOG=warn @1@ build -d @2@ 3>&2 2>&1 1>&3) | { grep -Fv "because fragment resolution isn't implemented" || :; } 3>&2 2>&1 1>&3
9393
rm -rf @2@/manual
9494
mv @2@/html @2@/manual
95+
# Remove Mathjax 2.7, because we will actually use MathJax 3.x
96+
find @2@/manual | grep .html | xargs sed -i -e '/2.7.1.MathJax.js/d'
9597
find @2@/manual -iname meson.build -delete
9698
'''.format(
9799
python.full_path(),

doc/manual/package.nix

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# Configuration Options
1919

2020
version,
21+
22+
# `tests` attribute
23+
testers,
2124
}:
2225

2326
let
@@ -35,6 +38,13 @@ mkMesonDerivation (finalAttrs: {
3538
../../.version
3639
# For example JSON
3740
../../src/libutil-tests/data/hash
41+
../../src/libstore-tests/data/content-address
42+
../../src/libstore-tests/data/store-path
43+
../../src/libstore-tests/data/realisation
44+
../../src/libstore-tests/data/derived-path
45+
../../src/libstore-tests/data/path-info
46+
../../src/libstore-tests/data/nar-info
47+
../../src/libstore-tests/data/build-result
3848
# Too many different types of files to filter for now
3949
../../doc/manual
4050
./.
@@ -48,8 +58,8 @@ mkMesonDerivation (finalAttrs: {
4858
"man"
4959
];
5060

51-
# Hack for sake of the dev shell
52-
passthru.externalNativeBuildInputs = [
61+
nativeBuildInputs = [
62+
nix-cli
5363
meson
5464
ninja
5565
(lib.getBin lowdown-unsandboxed)
@@ -68,10 +78,6 @@ mkMesonDerivation (finalAttrs: {
6878
changelog-d
6979
];
7080

71-
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
72-
nix-cli
73-
];
74-
7581
preConfigure = ''
7682
chmod u+w ./.version
7783
echo ${finalAttrs.version} > ./.version
@@ -82,6 +88,29 @@ mkMesonDerivation (finalAttrs: {
8288
echo "doc manual ''$out/share/doc/nix/manual" >> ''$out/nix-support/hydra-build-products
8389
'';
8490

91+
/**
92+
The root of the HTML manual.
93+
E.g. "${nix-manual.site}/index.html" exists.
94+
*/
95+
passthru.site = finalAttrs.finalPackage + "/share/doc/nix/manual";
96+
97+
passthru.tests = {
98+
# https://nixos.org/manual/nixpkgs/stable/index.html#tester-lycheeLinkCheck
99+
linkcheck = testers.lycheeLinkCheck {
100+
inherit (finalAttrs.finalPackage) site;
101+
extraConfig = {
102+
exclude = [
103+
# Exclude auto-generated JSON schema documentation which has
104+
# auto-generated fragment IDs that don't match the link references
105+
".*/protocols/json/.*\\.html"
106+
# Exclude undocumented builtins
107+
".*/language/builtins\\.html#builtins-addErrorContext"
108+
".*/language/builtins\\.html#builtins-appendContext"
109+
];
110+
};
111+
};
112+
};
113+
85114
meta = {
86115
platforms = lib.platforms.all;
87116
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
synopsis: Channel URLs migrated to channels.nixos.org subdomain
3+
prs: [14518]
4+
issues: [14517]
5+
---
6+
7+
Channel URLs have been updated from `https://nixos.org/channels/` to `https://channels.nixos.org/` throughout Nix.
8+
9+
The subdomain provides better reliability with IPv6 support and improved CDN distribution. The old domain apex (`nixos.org/channels/`) currently redirects to the new location but may be deprecated in the future.

0 commit comments

Comments
 (0)