···49495050 programs.keep-sorted.enable = true;
51515252- # This uses nixfmt-rfc-style underneath,
5252+ # This uses nixfmt underneath,
5353 # the default formatter for Nix code.
5454 # See https://github.com/NixOS/nixfmt
5555 programs.nixfmt.enable = true;
+1
doc/release-notes/rl-2511.section.md
···88 this release sets the default march level to `la64v1.0`, covering the desktop and server processors of 3X5000
99 and newer series. However, embedded chips without LSX (Loongson SIMD eXtension), such as 2K0300 SoC, are not
1010 supported. `pkgsCross.loongarch64-linux-embedded` can be used to build software and systems for these platforms.
1111+- The official Nix formatter `nixfmt` is now stable and available as `pkgs.nixfmt`, deprecating the temporary `pkgs.nixfmt-rfc-style` attribute. The classic `nixfmt` will stay available for some more time as `pkgs.nixfmt-classic`.
11121213## Backward Incompatibilities {#sec-nixpkgs-release-25.11-incompatibilities}
1314
+1-1
doc/stdenv/passthru.chapter.md
···53535454 These tend to entail support from the derivation or the `passthru` attribute in question.
5555 Common examples of this type are `passthru.optional-dependencies`, `passthru.withPlugins`, and `passthru.withPackages`.
5656- All of those allow associating the package with a set of components built for that specific package, such as when building Python runtime environments using (`python.withPackages`)[#python.withpackages-function].
5656+ All of those allow associating the package with a set of components built for that specific package, such as when building Python runtime environments using [`python.withPackages`](#python.withpackages-function).
57575858Attributes that apply only to particular [build helpers](#part-builders) or [language ecosystems](#chap-language-support) are documented there.
5959
···11#! /usr/bin/env nix-shell
22-#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-unstable nixfmt-rfc-style -I nixpkgs=.
22+#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-unstable -I nixpkgs=.
3344# Updates cabal2nix-unstable to the latest master of the nixos/cabal2nix repository.
55# See regenerate-hackage-packages.sh for details on the purpose of this script.
+6-1
maintainers/scripts/update.py
···77import json
88import os
99import re
1010+import shlex
1011import subprocess
1112import sys
1213import tempfile
···235236 f"UPDATE_NIX_PNAME={package['pname']}",
236237 f"UPDATE_NIX_OLD_VERSION={package['oldVersion']}",
237238 f"UPDATE_NIX_ATTR_PATH={package['attrPath']}",
238238- *update_script_command,
239239+ # Run all update scripts in the Nixpkgs development shell to get access to formatters and co.
240240+ "nix-shell",
241241+ nixpkgs_root + "/shell.nix",
242242+ "--run",
243243+ " ".join([ shlex.quote(s) for s in update_script_command ]),
239244 stdout=asyncio.subprocess.PIPE,
240245 stderr=asyncio.subprocess.PIPE,
241246 cwd=worktree,
···340340list-id: test-options-list
341341source: @NIXOS_TEST_OPTIONS_JSON@
342342```
343343+344344+## Accessing VMs in the sandbox with SSH {#sec-test-sandbox-breakpoint}
345345+346346+As explained in [](#sec-nixos-test-ssh-access), it's possible to configure an
347347+SSH backdoor based on AF_VSOCK. This can be used to SSH into a VM of a running
348348+build in a sandbox.
349349+350350+This can be done when something in the test fails, e.g.
351351+352352+```nix
353353+{
354354+ nodes.machine = {};
355355+356356+ sshBackdoor.enable = true;
357357+ enableDebugHook = true;
358358+359359+ testScript = ''
360360+ start_all()
361361+ machine.succeed("false") # this will fail
362362+ '';
363363+}
364364+```
365365+366366+For the AF_VSOCK feature to work, `/dev/vhost-vsock` is needed in the sandbox
367367+which can be done with e.g.
368368+369369+```
370370+nix-build -A nixosTests.foo --option sandbox-paths /dev/vhost-vsock
371371+```
372372+373373+This will halt the test execution on a test-failure and print instructions
374374+on how to enter the sandbox shell of the VM test. Inside, one can log into
375375+e.g. `machine` with
376376+377377+```
378378+ssh -F ./ssh_config vsock/3
379379+```
380380+381381+As described in [](#sec-nixos-test-ssh-access), the numbers for vsock start at
382382+`3` instead of `1`. So the first VM in the network (sorted alphabetically) can
383383+be accessed with `vsock/3`.
384384+385385+Alternatively, it's possible to explicitly set a breakpoint with
386386+`debug.breakpoint()`. This also has the benefit, that one can step through
387387+`testScript` with `pdb` like this:
388388+389389+```
390390+$ sudo /nix/store/eeeee-attach <id>
391391+bash# telnet 127.0.0.1 4444
392392+pdb$ …
393393+```
···5566import ptpython.ipython
7788+from test_driver.debug import Debug, DebugAbstract, DebugNop
89from test_driver.driver import Driver
910from test_driver.logger import (
1011 CompositeLogger,
···6465 "--interactive",
6566 help="drop into a python repl and run the tests interactively",
6667 action=argparse.BooleanOptionalAction,
6868+ )
6969+ arg_parser.add_argument(
7070+ "--debug-hook-attach",
7171+ help="Enable interactive debugging breakpoints for sandboxed runs",
6772 )
6873 arg_parser.add_argument(
6974 "--start-scripts",
···129134 if not args.keep_vm_state:
130135 logger.info("Machine state will be reset. To keep it, pass --keep-vm-state")
131136137137+ debugger: DebugAbstract = DebugNop()
138138+ if args.debug_hook_attach is not None:
139139+ debugger = Debug(logger, args.debug_hook_attach)
140140+132141 with Driver(
133142 args.start_scripts,
134143 args.vlans,
···137146 logger,
138147 args.keep_vm_state,
139148 args.global_timeout,
149149+ debug=debugger,
140150 ) as driver:
141151 if args.interactive:
142152 history_dir = os.getcwd()
+53
nixos/lib/test-driver/src/test_driver/debug.py
···11+import logging
22+import os
33+import random
44+import shutil
55+import subprocess
66+import sys
77+from abc import ABC, abstractmethod
88+99+from remote_pdb import RemotePdb # type:ignore
1010+1111+from test_driver.logger import AbstractLogger
1212+1313+1414+class DebugAbstract(ABC):
1515+ @abstractmethod
1616+ def breakpoint(self, host: str = "127.0.0.1", port: int = 4444) -> None:
1717+ pass
1818+1919+2020+class DebugNop(DebugAbstract):
2121+ def __init__(self) -> None:
2222+ pass
2323+2424+ def breakpoint(self, host: str = "127.0.0.1", port: int = 4444) -> None:
2525+ pass
2626+2727+2828+class Debug(DebugAbstract):
2929+ def __init__(self, logger: AbstractLogger, attach_command: str) -> None:
3030+ self.breakpoint_on_failure = False
3131+ self.logger = logger
3232+ self.attach = attach_command
3333+3434+ def breakpoint(self, host: str = "127.0.0.1", port: int = 4444) -> None:
3535+ """
3636+ Call this function to stop execution and put the process on sleep while
3737+ at the same time have the test driver provide a debug shell on TCP port
3838+ `port`. This is meant to be used for sandboxed tests that have the test
3939+ driver feature `enableDebugHook` enabled.
4040+ """
4141+ pattern = str(random.randrange(999999, 9999999))
4242+ self.logger.log_test_error(
4343+ f"Breakpoint reached, run 'sudo {self.attach} {pattern}'"
4444+ )
4545+ os.environ["bashInteractive"] = shutil.which("bash") # type:ignore
4646+ if os.fork() == 0:
4747+ subprocess.run(["sleep", pattern])
4848+ else:
4949+ # RemotePdb writes log messages to both stderr AND the logger,
5050+ # which is the same here. Hence, disabling the remote_pdb logger
5151+ # to avoid duplicate messages in the build log.
5252+ logging.root.manager.loggerDict["remote_pdb"].disabled = True # type:ignore
5353+ RemotePdb(host=host, port=port).set_trace(sys._getframe().f_back)
+11
nixos/lib/test-driver/src/test_driver/driver.py
···13131414from colorama import Style
15151616+from test_driver.debug import DebugAbstract, DebugNop
1617from test_driver.errors import MachineError, RequestedAssertionFailed
1718from test_driver.logger import AbstractLogger
1819from test_driver.machine import Machine, NixStartScript, retry
···6768 global_timeout: int
6869 race_timer: threading.Timer
6970 logger: AbstractLogger
7171+ debug: DebugAbstract
70727173 def __init__(
7274 self,
···7779 logger: AbstractLogger,
7880 keep_vm_state: bool = False,
7981 global_timeout: int = 24 * 60 * 60 * 7,
8282+ debug: DebugAbstract = DebugNop(),
8083 ):
8184 self.tests = tests
8285 self.out_dir = out_dir
8386 self.global_timeout = global_timeout
8487 self.race_timer = threading.Timer(global_timeout, self.terminate_test)
8588 self.logger = logger
8989+ self.debug = debug
86908791 tmp_dir = get_tmp_dir()
8892···159163 polling_condition=self.polling_condition,
160164 Machine=Machine, # for typing
161165 t=AssertionTester(),
166166+ debug=self.debug,
162167 )
163168 machine_symbols = {pythonize_name(m.name): m for m in self.machines}
164169 # If there's exactly one machine, make it available under the name
···224229 for line in f"{exc_prefix}: {exc}".splitlines():
225230 self.logger.log_test_error(line)
226231232232+ self.debug.breakpoint()
233233+227234 sys.exit(1)
235235+236236+ except Exception:
237237+ self.debug.breakpoint()
238238+ raise
228239229240 def run_tests(self) -> None:
230241 """Run the test script (for non-interactive test runs)"""
+2
nixos/lib/test-script-prepend.py
···11# This file contains type hints that can be prepended to Nix test scripts so they can be type
22# checked.
3344+from test_driver.debug import DebugAbstract
45from test_driver.driver import Driver
56from test_driver.vlan import VLan
67from test_driver.machine import Machine
···5253serial_stdout_off: Callable[[], None]
5354serial_stdout_on: Callable[[], None]
5455polling_condition: PollingConditionProtocol
5656+debug: DebugAbstract
5557t: TestCase
+2-1
nixos/lib/testing/nodes.nix
···8484 options = {
8585 sshBackdoor = {
8686 enable = mkOption {
8787- default = false;
8787+ default = config.enableDebugHook;
8888+ defaultText = lib.literalExpression "config.enableDebugHook";
8889 type = types.bool;
8990 description = "Whether to turn on the VSOCK-based access to all VMs. This provides an unauthenticated access intended for debugging.";
9091 };
+32-7
nixos/lib/testing/run.nix
···77}:
88let
99 inherit (lib) types mkOption;
1010+ inherit (hostPkgs.stdenv.hostPlatform) isDarwin isLinux;
10111112 # TODO (lib): Also use lib equivalent in nodes.nix
1213 /**
···2627 */
2728 f:
2829 lib.mkOverride (opt.highestPrio - 1) (f opt.value);
2929-3030in
3131{
3232 options = {
···4242 '';
4343 };
44444545+ enableDebugHook = lib.mkEnableOption "" // {
4646+ description = ''
4747+ Halt test execution after any test fail and provide the possibility to
4848+ hook into the sandbox to connect with either the test driver via
4949+ `telnet localhost 4444` or with the VMs via SSH and vsocks (see also
5050+ `sshBackdoor.enable`).
5151+ '';
5252+ };
5353+4554 rawTestDerivation = mkOption {
4655 type = types.package;
4756 description = ''
···7483 rawTestDerivation = hostPkgs.stdenv.mkDerivation config.rawTestDerivationArg;
7584 rawTestDerivationArg =
7685 finalAttrs:
7777- assert lib.assertMsg (!config.sshBackdoor.enable)
7878- "The SSH backdoor is currently not supported for non-interactive testing! Please make sure to only set `interactive.sshBackdoor.enable = true;`!";
8686+ assert lib.assertMsg (
8787+ config.sshBackdoor.enable -> isLinux
8888+ ) "The SSH backdoor is not supported for macOS host systems!";
8989+9090+ assert lib.assertMsg (
9191+ config.enableDebugHook -> isLinux
9292+ ) "The debugging hook is not supported for macOS host systems!";
7993 {
8094 name = "vm-test-run-${config.name}";
81958296 requiredSystemFeatures =
8383- [ "nixos-test" ]
8484- ++ lib.optionals hostPkgs.stdenv.hostPlatform.isLinux [ "kvm" ]
8585- ++ lib.optionals hostPkgs.stdenv.hostPlatform.isDarwin [ "apple-virt" ];
9797+ [ "nixos-test" ] ++ lib.optional isLinux "kvm" ++ lib.optional isDarwin "apple-virt";
9898+9999+ nativeBuildInputs = lib.optionals config.enableDebugHook [
100100+ hostPkgs.openssh
101101+ hostPkgs.inetutils
102102+ ];
8610387104 buildCommand = ''
88105 mkdir -p $out
···90107 # effectively mute the XMLLogger
91108 export LOGFILE=/dev/null
921099393- ${config.driver}/bin/nixos-test-driver -o $out
110110+ ${lib.optionalString config.enableDebugHook ''
111111+ ln -sf \
112112+ ${hostPkgs.systemd}/lib/systemd/ssh_config.d/20-systemd-ssh-proxy.conf \
113113+ ssh_config
114114+ ''}
115115+116116+ ${config.driver}/bin/nixos-test-driver \
117117+ -o $out \
118118+ ${lib.optionalString config.enableDebugHook "--debug-hook=${hostPkgs.breakpointHook.attach}"}
94119 '';
9512096121 passthru = config.passthru;
···104104[`services.ocis.environmentFile`][mod-envFile] for
105105sensitive values.
106106107107-Configuration in (`services.ocis.environment`)[mod-env] overrides those from
107107+Configuration in [`services.ocis.environment`][mod-env] overrides those from
108108[`services.ocis.environmentFile`][mod-envFile] and will have highest
109109precedence
110110
+11
nixos/modules/system/boot/systemd/repart.nix
···8585 '';
8686 default = true;
8787 };
8888+8989+ extraArgs = lib.mkOption {
9090+ description = ''
9191+ Extra command-line arguments to pass to systemd-repart.
9292+9393+ See {manpage}`systemd-repart(8)` for all available options.
9494+ '';
9595+ type = lib.types.listOf lib.types.str;
9696+ default = [ ];
9797+ };
8898 };
899990100 systemd.repart = {
···177187 --dry-run=no \
178188 --empty=${initrdCfg.empty} \
179189 --discard=${lib.boolToString initrdCfg.discard} \
190190+ ${utils.escapeSystemdExecArgs initrdCfg.extraArgs} \
180191 ${lib.optionalString (initrdCfg.device != null) initrdCfg.device}
181192 ''
182193 ];
···5454 machine.send_key("ret")
5555 machine.wait_for_text("Nextcloud")
5656 machine.send_key("ret")
5757- machine.wait_for_text("App metric")
5757+5858+ # OCR can't detect "App metric" anymore, so we will wait for another text
5959+ machine.wait_for_text("Open network settings")
5860 machine.send_key("ret")
59616062 # Doesn't work for non-root
+95-23
nixos/tests/systemd-repart.nix
···991010let
1111 # A testScript fragment that prepares a disk with some empty, unpartitioned
1212- # space. and uses it to boot the test with. Takes a single argument `machine`
1313- # from which the diskImage is extracted.
1414- useDiskImage = machine: ''
1515- import os
1616- import shutil
1717- import subprocess
1818- import tempfile
1212+ # space. and uses it to boot the test with.
1313+ # Takes two arguments, `machine` from which the diskImage is extracted,
1414+ # as well an optional `sizeDiff` (defaulting to +32M), describing how should
1515+ # be resized.
1616+ useDiskImage =
1717+ {
1818+ machine,
1919+ sizeDiff ? "+32M",
2020+ }:
2121+ ''
2222+ import os
2323+ import shutil
2424+ import subprocess
2525+ import tempfile
19262020- tmp_disk_image = tempfile.NamedTemporaryFile()
2727+ tmp_disk_image = tempfile.NamedTemporaryFile()
21282222- shutil.copyfile("${machine.system.build.diskImage}/nixos.img", tmp_disk_image.name)
2929+ shutil.copyfile("${machine.system.build.diskImage}/nixos.img", tmp_disk_image.name)
23302424- subprocess.run([
2525- "${machine.virtualisation.qemu.package}/bin/qemu-img",
2626- "resize",
2727- "-f",
2828- "raw",
2929- tmp_disk_image.name,
3030- "+32M",
3131- ])
3131+ subprocess.run([
3232+ "${machine.virtualisation.qemu.package}/bin/qemu-img",
3333+ "resize",
3434+ "-f",
3535+ "raw",
3636+ tmp_disk_image.name,
3737+ "${sizeDiff}",
3838+ ])
32393333- # Set NIX_DISK_IMAGE so that the qemu script finds the right disk image.
3434- os.environ['NIX_DISK_IMAGE'] = tmp_disk_image.name
3535- '';
4040+ # Set NIX_DISK_IMAGE so that the qemu script finds the right disk image.
4141+ os.environ['NIX_DISK_IMAGE'] = tmp_disk_image.name
4242+ '';
36433744 common =
3845 {
···98105 testScript =
99106 { nodes, ... }:
100107 ''
101101- ${useDiskImage nodes.machine}
108108+ ${useDiskImage { inherit (nodes) machine; }}
102109103110 machine.start()
104111 machine.wait_for_unit("multi-user.target")
···108115 '';
109116 };
110117118118+ encrypt-tpm2 = makeTest {
119119+ name = "systemd-repart-encrypt-tpm2";
120120+ meta.maintainers = with maintainers; [ flokli ];
121121+122122+ nodes.machine =
123123+ {
124124+ config,
125125+ pkgs,
126126+ lib,
127127+ ...
128128+ }:
129129+ {
130130+ imports = [ common ];
131131+132132+ boot.initrd.systemd.enable = true;
133133+134134+ boot.initrd.availableKernelModules = [ "dm_crypt" ];
135135+ boot.initrd.luks.devices = lib.mkVMOverride {
136136+ created-crypt = {
137137+ device = "/dev/disk/by-partlabel/created-crypt";
138138+ crypttabExtraOpts = [ "tpm2-device=auto" ];
139139+ };
140140+ };
141141+ boot.initrd.systemd.repart.enable = true;
142142+ boot.initrd.systemd.repart.extraArgs = [
143143+ "--tpm2-pcrs=7"
144144+ ];
145145+ systemd.repart.partitions = {
146146+ "10-root" = {
147147+ Type = "linux-generic";
148148+ };
149149+ "10-crypt" = {
150150+ Type = "var";
151151+ Label = "created-crypt";
152152+ Format = "ext4";
153153+ Encrypt = "tpm2";
154154+ };
155155+ };
156156+ virtualisation.tpm.enable = true;
157157+ virtualisation.fileSystems = {
158158+ "/var" = {
159159+ device = "/dev/mapper/created-crypt";
160160+ fsType = "ext4";
161161+ };
162162+ };
163163+ };
164164+165165+ testScript =
166166+ { nodes, ... }:
167167+ ''
168168+ ${useDiskImage {
169169+ inherit (nodes) machine;
170170+ sizeDiff = "+100M";
171171+ }}
172172+173173+ machine.start()
174174+ machine.wait_for_unit("multi-user.target")
175175+176176+ systemd_repart_logs = machine.succeed("journalctl --boot --unit systemd-repart.service")
177177+ assert "Encrypting future partition 2" in systemd_repart_logs
178178+179179+ assert "/dev/mapper/created-crypt" in machine.succeed("mount")
180180+ '';
181181+ };
182182+111183 after-initrd = makeTest {
112184 name = "systemd-repart-after-initrd";
113185 meta.maintainers = with maintainers; [ nikstur ];
···128200 testScript =
129201 { nodes, ... }:
130202 ''
131131- ${useDiskImage nodes.machine}
203203+ ${useDiskImage { inherit (nodes) machine; }}
132204133205 machine.start()
134206 machine.wait_for_unit("multi-user.target")
···196268 testScript =
197269 { nodes, ... }:
198270 ''
199199- ${useDiskImage nodes.machine}
271271+ ${useDiskImage { inherit (nodes) machine; }}
200272201273 machine.start()
202274 machine.wait_for_unit("multi-user.target")
+2-1
pkgs/README.md
···940940You can run `nix-shell maintainers/scripts/update.nix` in the root of Nixpkgs repository for information on how to use it.
941941`update.nix` offers several modes for selecting packages to update, and it will execute update scripts for all matched packages that have an `updateScript` attribute.
942942943943-Each update script will be passed the following environment variables:
943943+Update scripts will be run inside the [Nixpkgs development shell](../shell.nix), providing access to some useful tools for CI.
944944+Furthermore each update script will be passed the following environment variables:
944945945946- [`UPDATE_NIX_NAME`] – content of the `name` attribute of the updated package
946947- [`UPDATE_NIX_PNAME`] – content of the `pname` attribute of the updated package
···11-#!/usr/bin/env nix-shell
22-#!nix-shell -i bash -p cabal2nix curl jq
33-#
44-# This script will update the nixfmt-rfc-style derivation to the latest version using
55-# cabal2nix.
66-77-set -eo pipefail
88-99-# This is the directory of this update.sh script.
1010-script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1111-1212-derivation_file="${script_dir}/generated-package.nix"
1313-date_file="${script_dir}/date.txt"
1414-1515-# This is the latest version of nixfmt-rfc-style branch on GitHub.
1616-new_version=$(curl --silent https://api.github.com/repos/nixos/nixfmt/git/refs/heads/master | jq '.object.sha' --raw-output)
1717-new_date=$(curl --silent https://api.github.com/repos/nixos/nixfmt/git/commits/"$new_version" | jq '.committer.date' --raw-output)
1818-1919-echo "Updating nixfmt-rfc-style to version $new_date."
2020-echo "Running cabal2nix and outputting to ${derivation_file}..."
2121-2222-cat > "$derivation_file" << EOF
2323-# This file has been autogenerate with cabal2nix.
2424-# Update via ./update.sh
2525-EOF
2626-2727-cabal2nix --jailbreak \
2828- "https://github.com/nixos/nixfmt/archive/${new_version}.tar.gz" \
2929- >> "$derivation_file"
3030-3131-date --date="$new_date" -I > "$date_file"
3232-3333-echo "Finished."
···11+{
22+ haskell,
33+ haskellPackages,
44+ lib,
55+ runCommand,
66+ nixfmt,
77+}:
88+let
99+ inherit (haskell.lib.compose) overrideCabal justStaticExecutables;
1010+1111+ overrides = {
1212+ passthru.updateScript = ./update.sh;
1313+1414+ teams = [ lib.teams.formatter ];
1515+1616+ # These tests can be run with the following command.
1717+ #
1818+ # $ nix-build -A nixfmt.tests
1919+ passthru.tests = runCommand "nixfmt-tests" { nativeBuildInputs = [ nixfmt ]; } ''
2020+ nixfmt --version > $out
2121+ '';
2222+ };
2323+ raw-pkg = haskellPackages.callPackage ./generated-package.nix { };
2424+in
2525+lib.pipe raw-pkg [
2626+ (overrideCabal overrides)
2727+ justStaticExecutables
2828+]
+27
pkgs/by-name/ni/nixfmt/update.sh
···11+#!/usr/bin/env nix-shell
22+#!nix-shell -i bash -p cabal2nix curl jq
33+#
44+# This script will update the nixfmt derivation to the latest version using
55+# cabal2nix.
66+77+set -eo pipefail
88+99+# This is the directory of this update.sh script.
1010+script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1111+derivation_file="${script_dir}/generated-package.nix"
1212+1313+release_tag=$(curl --silent https://api.github.com/repos/NixOS/nixfmt/releases/latest | jq '.tag_name' --raw-output)
1414+1515+echo "Updating nixfmt to version $release_tag."
1616+echo "Running cabal2nix and outputting to ${derivation_file}..."
1717+1818+cat > "$derivation_file" << EOF
1919+# This file has been autogenerate with cabal2nix.
2020+# Update via ./update.sh
2121+EOF
2222+2323+cabal2nix --jailbreak \
2424+ "https://github.com/nixos/nixfmt/archive/${release_tag}.tar.gz" \
2525+ >> "$derivation_file"
2626+2727+echo "Finished."
···14121412 nixStable = nixVersions.stable; # Added 2022-01-24
14131413 nixUnstable = throw "nixUnstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest."; # Converted to throw 2024-04-22
14141414 nix_2_3 = nixVersions.nix_2_3;
14151415- nixfmt = lib.warnOnInstantiate "nixfmt was renamed to nixfmt-classic. The nixfmt attribute may be used for the new RFC 166-style formatter in the future, which is currently available as nixfmt-rfc-style" nixfmt-classic; # Added 2024-03-31
14151415+ nixfmt-rfc-style =
14161416+ if lib.oldestSupportedReleaseIsAtLeast 2511 then
14171417+ lib.warnOnInstantiate
14181418+ "nixfmt-rfc-style is now the same as pkgs.nixfmt which should be used instead."
14191419+ nixfmt # Added 2025-07-14
14201420+ else
14211421+ nixfmt;
1416142214171423 # When the nixops_unstable alias is removed, nixops_unstable_minimal can be renamed to nixops_unstable.
14181424