Merge pull request #144197 from NixOS/nix-2.4

nix: 2.3.16 -> 2.4

Changed files
+48 -27
lib
nixos
doc
manual
from_md
release-notes
release-notes
modules
installer
pkgs
development
haskell-modules
tools
package-management
top-level
+12 -12
lib/tests/modules.sh
···
# Check boolean option.
checkConfigOutput "false" config.enable ./declare-enable.nix
-
checkConfigError 'The option .* does not exist. Definition values:\n- In .*: true' config.enable ./define-enable.nix
+
checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./define-enable.nix
# Check integer types.
# unsigned
checkConfigOutput "42" config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix
-
checkConfigError 'A definition for option .* is not of type.*unsigned integer.*. Definition values:\n- In .*: -23' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix
+
checkConfigError 'A definition for option .* is not of type.*unsigned integer.*. Definition values:\n\s*- In .*: -23' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix
# positive
-
checkConfigError 'A definition for option .* is not of type.*positive integer.*. Definition values:\n- In .*: 0' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix
+
checkConfigError 'A definition for option .* is not of type.*positive integer.*. Definition values:\n\s*- In .*: 0' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix
# between
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
-
checkConfigError 'A definition for option .* is not of type.*between.*-21 and 43.*inclusive.*. Definition values:\n- In .*: -23' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
+
checkConfigError 'A definition for option .* is not of type.*between.*-21 and 43.*inclusive.*. Definition values:\n\s*- In .*: -23' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
# Check either types
# types.either
···
set -- config.enable ./define-enable.nix ./declare-enable.nix
checkConfigOutput "true" "$@"
checkConfigOutput "false" "$@" ./disable-define-enable.nix
-
checkConfigError "The option .*enable.* does not exist. Definition values:\n- In .*: true" "$@" ./disable-declare-enable.nix
+
checkConfigError "The option .*enable.* does not exist. Definition values:\n\s*- In .*: true" "$@" ./disable-declare-enable.nix
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-define-enable.nix ./disable-declare-enable.nix
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-enable-modules.nix
···
# Check _module.check.
set -- config.enable ./declare-enable.nix ./define-enable.nix ./define-attrsOfSub-foo.nix
-
checkConfigError 'The option .* does not exist. Definition values:\n- In .*' "$@"
+
checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*' "$@"
checkConfigOutput "true" "$@" ./define-module-check.nix
# Check coerced value.
checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix
checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix
-
checkConfigError 'A definition for option .* is not.*string or signed integer convertible to it.*. Definition values:\n- In .*: \[ \]' config.value ./declare-coerced-value.nix ./define-value-list.nix
+
checkConfigError 'A definition for option .* is not.*string or signed integer convertible to it.*. Definition values:\n\s*- In .*: \[ \]' config.value ./declare-coerced-value.nix ./define-value-list.nix
# Check coerced value with unsound coercion
checkConfigOutput "12" config.value ./declare-coerced-value-unsound.nix
-
checkConfigError 'A definition for option .* is not of type .*. Definition values:\n- In .*: "1000"' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix
-
checkConfigError 'unrecognised JSON value' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix
+
checkConfigError 'A definition for option .* is not of type .*. Definition values:\n\s*- In .*: "1000"' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix
+
checkConfigError 'json.exception.parse_error' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix
# Check mkAliasOptionModule.
checkConfigOutput "true" config.enable ./alias-with-priority.nix
···
## shorthandOnlyDefines config behaves as expected
checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-shorthand.nix
checkConfigError 'is not of type `boolean' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-noshorthand.nix
-
checkConfigError "You're trying to declare a value of type \`bool'\nrather than an attribute-set for the option" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix
+
checkConfigError "You're trying to declare a value of type \`bool'\n\s*rather than an attribute-set for the option" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix
checkConfigOutput "true" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-noshorthand.nix
## submoduleWith should merge all modules in one swoop
···
checkConfigOutput "true" config.enable ./disable-recursive/main.nix
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-foo.nix}
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-bar.nix}
-
checkConfigError 'The option .* does not exist. Definition values:\n- In .*: true' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix}
+
checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix}
# Check that imports can depend on derivations
checkConfigOutput "true" config.enable ./import-from-store.nix
···
## types.functionTo
checkConfigOutput "input is input" config.result ./functionTo/trivial.nix
checkConfigOutput "a b" config.result ./functionTo/merging-list.nix
-
checkConfigError 'A definition for option .fun.\[function body\]. is not of type .string.. Definition values:\n- In .*wrong-type.nix' config.result ./functionTo/wrong-type.nix
+
checkConfigError 'A definition for option .fun.\[function body\]. is not of type .string.. Definition values:\n\s*- In .*wrong-type.nix' config.result ./functionTo/wrong-type.nix
checkConfigOutput "b a" config.result ./functionTo/list-order.nix
checkConfigOutput "a c" config.result ./functionTo/merging-attrs.nix
+4
lib/tests/release.nix
···
export NIX_STORE_DIR=$TEST_ROOT/store
export PAGER=cat
cacheDir=$TEST_ROOT/binary-cache
+
+
mkdir -p $NIX_CONF_DIR
+
echo "experimental-features = nix-command" >> $NIX_CONF_DIR/nix.conf
+
nix-store --init
cp -r ${../.} lib
+3 -3
lib/tests/sources.sh
···
# nix-instantiate doesn't write out the source, only computing the hash, so
# this uses the experimental nix command instead.
-
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
+
dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
cleanSource ./.
}")')"
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
···
) || die "cleanSource 1"
-
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
+
dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
cleanSourceWith { src = '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
}")')"
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
···
EOF
) || die "cleanSourceWith 1"
-
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
+
dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
cleanSourceWith { src = cleanSource '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
}")')"
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
+9
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
···
<itemizedlist>
<listitem>
<para>
+
Nix has been updated to version 2.4, reference its
+
<link xlink:href="https://discourse.nixos.org/t/nix-2-4-released/15822">release
+
notes</link> for more information on what has changed. The
+
previous version of Nix, 2.3.16, remains available for the
+
time being in the <literal>nix_2_3</literal> package.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
<literal>iptables</literal> now uses
<literal>nf_tables</literal> backend.
</para>
+2
nixos/doc/manual/release-notes/rl-2111.section.md
···
## Highlights {#sec-release-21.11-highlights}
+
- Nix has been updated to version 2.4, reference its [release notes](https://discourse.nixos.org/t/nix-2-4-released/15822) for more information on what has changed. The previous version of Nix, 2.3.16, remains available for the time being in the `nix_2_3` package.
+
- `iptables` now uses `nf_tables` backend.
- PHP now defaults to PHP 8.0, updated from 7.4.
+5 -5
nixos/modules/installer/tools/nix-fallback-paths.nix
···
{
-
x86_64-linux = "/nix/store/nzp4m3cmm7wawk031byh8jg4cdzjq212-nix-2.3.16";
-
i686-linux = "/nix/store/zsaza9pwim617ak15fsc31lv65b9w3in-nix-2.3.16";
-
aarch64-linux = "/nix/store/7f6z40gyd405yd50qkyzwilnqw106bx8-nix-2.3.16";
-
x86_64-darwin = "/nix/store/c43kyri67ia8mibs0id5ara7gqwlkybf-nix-2.3.16";
-
aarch64-darwin = "/nix/store/6jwhak3cvsgnbqs540n27g8pxnk427fr-nix-2.3.16";
+
x86_64-linux = "/nix/store/hapw7q1fkjxvprnkcgw9ppczavg4daj2-nix-2.4";
+
i686-linux = "/nix/store/8qlvh8pp5j8wgrzj3is2jlbhgrwgsiy9-nix-2.4";
+
aarch64-linux = "/nix/store/h48lkygcqj4hdibbdnpl67q7ks6vkrd6-nix-2.4";
+
x86_64-darwin = "/nix/store/c3mvzszvyzakvcp9spnjvsb8m2bpjk7m-nix-2.4";
+
aarch64-darwin = "/nix/store/hbfqs62r0hga2yr4zi5kc7fzhf71bq9n-nix-2.4";
}
+5 -1
pkgs/development/haskell-modules/configuration-nix.nix
···
rel8 = addTestToolDepend super.rel8 pkgs.postgresql;
-
cachix = generateOptparseApplicativeCompletion "cachix" super.cachix;
+
cachix = generateOptparseApplicativeCompletion "cachix" (super.cachix.override { nix = pkgs.nix_2_3; });
+
+
hercules-ci-agent = super.hercules-ci-agent.override { nix = pkgs.nix_2_3; };
+
hercules-ci-cnix-expr = super.hercules-ci-cnix-expr.override { nix = pkgs.nix_2_3; };
+
hercules-ci-cnix-store = super.hercules-ci-cnix-store.override { nix = pkgs.nix_2_3; };
# Enable extra optimisations which increase build time, but also
# later compiler performance, so we should do this for user's benefit.
+1 -1
pkgs/tools/package-management/nix/default.nix
···
nix = nixStable;
-
nixStable = nix_2_3;
+
nixStable = nix_2_4;
nix_2_3 = callPackage common (rec {
pname = "nix";
+1 -1
pkgs/top-level/aliases.nix
···
nginxUnstable = nginxMainline; # added 2018-04-25
nilfs_utils = nilfs-utils; # added 2018-04-25
nix-review = nixpkgs-review; # added 2019-12-22
-
nixFlakes = nix_2_4; # added 2021-05-21
+
nixFlakes = nixStable; # added 2021-05-21
nmap_graphical = nmap-graphical; # added 2017-01-19
nmap-unfree = nmap; # added 2021-04-06
nologin = shadow; # added 2018-04-25
+3 -3
pkgs/top-level/all-packages.nix
···
nghttp2 = callPackage ../development/libraries/nghttp2 { };
libnghttp2 = nghttp2.lib;
-
nix-plugins = callPackage ../development/libraries/nix-plugins {};
+
nix-plugins = callPackage ../development/libraries/nix-plugins { nix = nix_2_3; };
nika-fonts = callPackage ../data/fonts/nika-fonts { };
···
nix-eval-jobs = callPackage ../tools/package-management/nix-eval-jobs { };
-
nix-doc = callPackage ../tools/package-management/nix-doc { };
+
nix-doc = callPackage ../tools/package-management/nix-doc { nix = nix_2_3; };
nix-bundle = callPackage ../tools/package-management/nix-bundle { };
···
nix-linter = haskell.lib.justStaticExecutables (haskellPackages.nix-linter);
-
nixos-option = callPackage ../tools/nix/nixos-option { };
+
nixos-option = callPackage ../tools/nix/nixos-option { nix = nix_2_3; };
nix-pin = callPackage ../tools/package-management/nix-pin { };
+2 -1
pkgs/top-level/nixpkgs-basic-release-checks.nix
···
pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; } ''
set -o pipefail
-
export NIX_STATE_DIR=$TMPDIR
+
export NIX_STORE_DIR=$TMPDIR/store
+
export NIX_STATE_DIR=$TMPDIR/state
export NIX_PATH=nixpkgs=$TMPDIR/barf.nix
opts=(--option build-users-group "")
nix-store --init
+1
pkgs/top-level/python-packages.nix
···
};
pythonix = callPackage ../development/python-modules/pythonix {
+
nix = pkgs.nix_2_3;
meson = pkgs.meson.override { python3 = self.python; };
};