diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 45a55eb45dcea..73f9e3a2e7f0c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,7 +13,6 @@ For new packages please briefly describe the package or provide a link to its ho - Built on platform: - [ ] x86_64-linux - [ ] aarch64-linux - - [ ] x86_64-darwin - [ ] aarch64-darwin - Tested, as applicable: - [ ] [NixOS tests] in [nixos/tests]. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48d69eeaea4ab..cb736468b2a7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,21 +34,18 @@ jobs: matrix: include: - runner: ubuntu-24.04 - name: x86_64-linux - systems: x86_64-linux + system: x86_64-linux builds: [shell, manual-nixos, lib-tests, tarball] desc: shell, docs, lib, tarball - runner: ubuntu-24.04-arm - name: aarch64-linux - systems: aarch64-linux + system: aarch64-linux builds: [shell, manual-nixos, manual-nixpkgs] desc: shell, docs - runner: macos-14 - name: darwin - systems: aarch64-darwin x86_64-darwin + system: aarch64-darwin builds: [shell] desc: shell - name: '${{ matrix.name }}: ${{ matrix.desc }}' + name: '${{ matrix.system }}: ${{ matrix.desc }}' runs-on: ${{ matrix.runner }} timeout-minutes: 60 steps: @@ -80,7 +77,7 @@ jobs: - name: Build shell if: contains(matrix.builds, 'shell') - run: echo "${{ matrix.systems }}" | xargs -n1 nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A shell --argstr system + run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A shell --argstr system '${{ matrix.system }}' - name: Build NixOS manual if: | @@ -106,5 +103,5 @@ jobs: contains(fromJSON(inputs.baseBranch).type, 'primary') uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: - name: ${{ inputs.artifact-prefix }}nixos-manual-${{ matrix.name }} + name: ${{ inputs.artifact-prefix }}nixos-manual-${{ matrix.system }} path: nixos-manual diff --git a/.github/workflows/merge-group.yml b/.github/workflows/merge-group.yml index 0c5291a9b7257..cfe1f7b391a47 100644 --- a/.github/workflows/merge-group.yml +++ b/.github/workflows/merge-group.yml @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false sparse-checkout: | - ci/supportedSystems.json + ci/github-script/supportedSystems.js - id: prepare uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 @@ -39,6 +39,8 @@ jobs: with: script: | const { classify } = require('./ci/supportedBranches.js') + const supportedSystems = require('./ci/github-script/supportedSystems.js') + const baseBranch = ( context.payload.merge_group?.base_ref ?? context.payload.pull_request.base.ref @@ -47,11 +49,16 @@ jobs: core.setOutput('base', baseClassification) core.info('base classification:', baseClassification) - core.setOutput('mergedSha', context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA) - core.info(`mergedSha: ${context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA}`) - core.setOutput('targetSha', context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA) - core.info(`targetSha: ${context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA}`) - core.setOutput('systems', require('./ci/supportedSystems.json')) + const mergedSha = context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA + core.setOutput('mergedSha', mergedSha) + core.info(`mergedSha: ${mergedSha}`) + + const targetSha = context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA + core.setOutput('targetSha', targetSha) + core.info(`targetSha: ${targetSha}`) + + const systems = await supportedSystems({ github, context, targetSha }) + core.setOutput('systems', systems) check: name: Check diff --git a/ci/eval/README.md b/ci/eval/README.md index 9a7aace268513..c9bd2d20aa7d0 100644 --- a/ci/eval/README.md +++ b/ci/eval/README.md @@ -10,14 +10,14 @@ nix-build ci -A eval.baseline The two most important arguments are: - `--arg evalSystems`: The set of systems for which `nixpkgs` should be evaluated. - Defaults to the four official platforms (`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`). + Defaults to the [supported systems](../../pkgs/top-level/release-supported-systems.json) for the branch. Example: `--arg evalSystems '["x86_64-linux" "aarch64-darwin"]'` - `--arg quickTest`: Enables testing a single chunk of the current system only for quick iteration. Example: `--arg quickTest true` The following arguments can be used to fine-tune performance: - `--max-jobs`: The maximum number of derivations to run at the same time. - Only each [supported system](../supportedSystems.json) gets a separate derivation, so it doesn't make sense to set this higher than that number. + Only each supported system gets a separate derivation, so it doesn't make sense to set this higher than that number. - `--cores`: The number of cores to use for each job. Recommended to set this to the number of cores on your system divided by `--max-jobs`. - `--arg chunkSize`: The number of attributes that are evaluated simultaneously on a single core. diff --git a/ci/eval/default.nix b/ci/eval/default.nix index b8d3d3224a047..7c0a2e9f31392 100644 --- a/ci/eval/default.nix +++ b/ci/eval/default.nix @@ -38,7 +38,6 @@ let fileset = unions ( map (lib.path.append ../..) [ ".version" - "ci/supportedSystems.json" "ci/eval/attrpaths.nix" "ci/eval/chunk.nix" "ci/eval/outpaths.nix" @@ -53,7 +52,9 @@ let ); }; - supportedSystems = builtins.fromJSON (builtins.readFile ../supportedSystems.json); + supportedSystems = builtins.fromJSON ( + builtins.readFile ../../pkgs/top-level/release-supported-systems.json + ); attrpathsSuperset = { diff --git a/ci/eval/outpaths.nix b/ci/eval/outpaths.nix index 1668708719d53..6c29ff403b47f 100755 --- a/ci/eval/outpaths.nix +++ b/ci/eval/outpaths.nix @@ -10,7 +10,9 @@ attrNamesOnly ? false, # Set this to `null` to build for builtins.currentSystem only - systems ? builtins.fromJSON (builtins.readFile ../supportedSystems.json), + systems ? builtins.fromJSON ( + builtins.readFile (path + "/pkgs/top-level/release-supported-systems.json") + ), # Customize the config used to evaluate nixpkgs extraNixpkgsConfig ? { }, diff --git a/ci/github-script/prepare.js b/ci/github-script/prepare.js index 005626c43ab57..dfe2d93f3d695 100644 --- a/ci/github-script/prepare.js +++ b/ci/github-script/prepare.js @@ -1,6 +1,7 @@ const { classify } = require('../supportedBranches.js') const { postReview, dismissReviews } = require('./reviews.js') const reviewKey = 'prepare' +const supportedSystems = require('./supportedSystems.js') module.exports = async ({ github, context, core, dry }) => { const pull_number = context.payload.pull_request.number @@ -209,7 +210,8 @@ module.exports = async ({ github, context, core, dry }) => { core.setOutput('mergedSha', mergedSha) core.setOutput('targetSha', targetSha) - core.setOutput('systems', require('../supportedSystems.json')) + const systems = await supportedSystems({ github, context, targetSha }) + core.setOutput('systems', systems) const files = ( await github.paginate(github.rest.pulls.listFiles, { diff --git a/ci/github-script/supportedSystems.js b/ci/github-script/supportedSystems.js new file mode 100644 index 0000000000000..2f7a762a0d051 --- /dev/null +++ b/ci/github-script/supportedSystems.js @@ -0,0 +1,10 @@ +module.exports = async ({ github, context, targetSha }) => { + const { content, encoding } = ( + await github.rest.repos.getContent({ + ...context.repo, + path: 'pkgs/top-level/release-supported-systems.json', + ref: targetSha, + }) + ).data + return JSON.parse(Buffer.from(content, encoding).toString()) +} diff --git a/doc/redirects.json b/doc/redirects.json index f5dbb8bb65f84..03285903666e4 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -869,6 +869,9 @@ "tar-files": [ "index.html#tar-files" ], + "x86_64-darwin-26.05": [ + "release-notes.html#x86_64-darwin-26.05" + ], "zip-files": [ "index.html#zip-files" ], diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index cf9f53baba965..0d70f1108d589 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -12,6 +12,27 @@ - Ruby default version has been updated from 3.3 to 3.4. Refer to the [upstream release announcement](https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/) for details. +- []{#x86_64-darwin-26.05} + + **This will be the last release of Nixpkgs to support `x86_64-darwin`.** + Platform support will be maintained and binaries built until Nixpkgs 26.05 goes out of support at the end of 2026. + For 26.11, due to Apple’s deprecation of the platform and limited build infrastructure and developer time, we will no longer build packages for `x86_64-darwin` or support building them from source. + + By the time of 26.11’s release, Homebrew will offer only limited [Tier 3](https://docs.brew.sh/Support-Tiers#tier-3) support for the platform, but MacPorts will likely continue to support it for a long time. + We also recommend users consider installing NixOS, which should continue to run on essentially all Intel Macs, especially after Apple stops security support for macOS 26 in 2028. + + A warning will be displayed for `x86_64-darwin` users; you can set [](#opt-allowDeprecatedx86_64Darwin) in the [Nixpkgs configuration](https://nixos.org/manual/nixpkgs/stable/#chap-packageconfig) to silence it. + The {file}`~/.config/nixpkgs/config.nix` file will not work for users of flakes, who can instead replace `nixpkgs.legacyPackages.x86_64-darwin` with + + ```nix + import nixpkgs { + system = "x86_64-darwin"; + config.allowDeprecatedx86_64Darwin = true; + } + ``` + + nix-darwin users can set [`nixpkgs.config.allowDeprecatedx86_64Darwin`](https://nix-darwin.github.io/nix-darwin/manual/index.html#opt-nixpkgs.config) in their system configurations. + - The Factor programming language has been updated to Version 0.101 bringing various improvements to UI rendering and HiDPI support as well as support for Unicode 17.0.0. Starting from Version 0.100, the Factor VM is compiled with Clang. diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 7efb305254206..8f700a07eb0ec 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -451,8 +451,8 @@ let Silence the warning for the upcoming deprecation of the `x86_64-darwin` platform in Nixpkgs 26.11. - This does nothing in 25.11, and is provided there for forward - compatibility of configurations with 26.05. + See the [release notes](#x86_64-darwin-26.05) for more + information. ''; }; diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix index 607145be06aa8..521745d67ec9b 100644 --- a/pkgs/top-level/default.nix +++ b/pkgs/top-level/default.nix @@ -18,6 +18,25 @@ or dot-files. */ +let + # We hoist this above the closure so that the same thunk is shared + # between multiple imports of Nixpkgs. This ensures that commands + # like `nix eval nixpkgs#legacyPackages.x86_64-darwin.pkgsStatic.hello` + # print only one warning, which would otherwise be spammy in common + # scenarios that instantiate many copies of Nixpkgs. + # + # Unfortunately, flakes’ handling of transitive dependencies mean + # that it’s still likely users will see multiple warnings, but + # there’s nothing we can do about that within the constraints of the + # Nix language. + x86_64DarwinDeprecationWarning = + pristineLib.warn + "Nixpkgs 26.05 will be the last release to support x86_64-darwin; see https://nixos.org/manual/nixpkgs/unstable/release-notes#x86_64-darwin-26.05" + (x: x); + + pristineLib = import ../../lib; +in + { # The system packages will be built on. See the manual for the # subtle division of labor between these two `*System`s and the three @@ -55,8 +74,6 @@ let # Rename the function arguments in let - pristineLib = import ../../lib; - lib = if __allowFileset then pristineLib @@ -82,8 +99,17 @@ let (throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list.") (throwIfNot (lib.all lib.isFunction overlays) "All overlays passed to nixpkgs must be functions.") (throwIfNot (lib.isList crossOverlays) "The crossOverlays argument to nixpkgs must be a list.") + (throwIfNot (lib.all lib.isFunction crossOverlays) "All crossOverlays passed to nixpkgs must be functions.") ( - throwIfNot (lib.all lib.isFunction crossOverlays) "All crossOverlays passed to nixpkgs must be functions." + if + ( + ((localSystem.isDarwin && localSystem.isx86) || (crossSystem.isDarwin && crossSystem.isx86)) + && config.allowDeprecatedx86_64Darwin == false + ) + then + x86_64DarwinDeprecationWarning + else + x: x ); localSystem = lib.systems.elaborate args.localSystem; diff --git a/pkgs/top-level/nixpkgs-basic-release-checks.nix b/pkgs/top-level/nixpkgs-basic-release-checks.nix index ed88991dd2cd6..7ec445402772e 100644 --- a/pkgs/top-level/nixpkgs-basic-release-checks.nix +++ b/pkgs/top-level/nixpkgs-basic-release-checks.nix @@ -56,7 +56,7 @@ pkgs.runCommand "nixpkgs-release-checks" set -x nix-env -f $src \ --show-trace --argstr system "$platform" \ - --arg config '{ allowAliases = false; }' \ + --arg config '{ allowAliases = false; allowDeprecatedx86_64Darwin = true; }' \ --option experimental-features 'no-url-literals' \ -qa --drv-path --system-filter \* --system \ "''${opts[@]}" 2> eval-warnings.log > packages1 @@ -72,7 +72,7 @@ pkgs.runCommand "nixpkgs-release-checks" nix-env -f $src2 \ --show-trace --argstr system "$platform" \ - --arg config '{ allowAliases = false; }' \ + --arg config '{ allowAliases = false; allowDeprecatedx86_64Darwin = true; }' \ --option experimental-features 'no-url-literals' \ -qa --drv-path --system-filter \* --system \ "''${opts[@]}" > packages2 @@ -95,7 +95,7 @@ pkgs.runCommand "nixpkgs-release-checks" nix-env -f $src \ --show-trace --argstr system "$platform" \ - --arg config '{ allowAliases = false; }' \ + --arg config '{ allowAliases = false; allowDeprecatedx86_64Darwin = true; }' \ --option experimental-features 'no-url-literals' \ -qa --drv-path --system-filter \* --system --meta --xml \ "''${opts[@]}" > /dev/null diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 69f212340c291..1515645fb40e0 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -10,7 +10,7 @@ $ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix */ { - supportedSystems ? builtins.fromJSON (builtins.readFile ../../ci/supportedSystems.json), + supportedSystems ? builtins.fromJSON (builtins.readFile ./release-supported-systems.json), }: let diff --git a/pkgs/top-level/release-staging.nix b/pkgs/top-level/release-staging.nix index 3782c2c3d0c13..a789bb29e0155 100644 --- a/pkgs/top-level/release-staging.nix +++ b/pkgs/top-level/release-staging.nix @@ -12,12 +12,7 @@ revision = "0000000000000000000000000000000000000000"; }, # The platform doubles for which we build Nixpkgs. - supportedSystems ? [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-linux" - "aarch64-darwin" - ], + supportedSystems ? builtins.fromJSON (builtins.readFile ./release-supported-systems.json), # Attributes passed to nixpkgs. Don't build packages marked as unfree. nixpkgsArgs ? { config = { diff --git a/ci/supportedSystems.json b/pkgs/top-level/release-supported-systems.json similarity index 100% rename from ci/supportedSystems.json rename to pkgs/top-level/release-supported-systems.json diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 2d0c24ba761b5..1ea39f2ce68e5 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -19,7 +19,7 @@ system ? builtins.currentSystem, officialRelease ? false, # The platform doubles for which we build Nixpkgs. - supportedSystems ? builtins.fromJSON (builtins.readFile ../../ci/supportedSystems.json), + supportedSystems ? builtins.fromJSON (builtins.readFile ./release-supported-systems.json), # The platform triples for which we build bootstrap tools. bootstrapConfigs ? [ "arm64-apple-darwin" diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 34edecf6d968e..cc66d61f448ef 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -268,12 +268,16 @@ let ] ++ overlays; ${if stdenv.hostPlatform == stdenv.buildPlatform then "localSystem" else "crossSystem"} = { - config = lib.systems.parse.tripleFromSystem ( - stdenv.hostPlatform.parsed - // { - cpu = lib.systems.parse.cpuTypes.i686; - } - ); + config = + if isSupported then + lib.systems.parse.tripleFromSystem ( + stdenv.hostPlatform.parsed + // { + cpu = lib.systems.parse.cpuTypes.i686; + } + ) + else + "i686-unknown-linux-gnu"; }; } else