Merge release-23.05 into staging-next-23.05

This commit is contained in:
github-actions[bot]
2023-06-27 00:16:48 +00:00
committed by GitHub
13 changed files with 142 additions and 33 deletions

View File

@@ -910,6 +910,40 @@ let
else opt // { type = opt.type.substSubModules opt.options; options = []; };
/*
Merge an option's definitions in a way that preserves the priority of the
individual attributes in the option value.
This does not account for all option semantics, such as readOnly.
Type:
option -> attrsOf { highestPrio, value }
*/
mergeAttrDefinitionsWithPrio = opt:
let
defsByAttr =
lib.zipAttrs (
lib.concatLists (
lib.concatMap
({ value, ... }@def:
map
(lib.mapAttrsToList (k: value: { ${k} = def // { inherit value; }; }))
(pushDownProperties value)
)
opt.definitionsWithLocations
)
);
in
assert opt.type.name == "attrsOf" || opt.type.name == "lazyAttrsOf";
lib.mapAttrs
(k: v:
let merging = lib.mergeDefinitions (opt.loc ++ [k]) opt.type.nestedTypes.elemType v;
in {
value = merging.mergedValue;
inherit (merging.defsFinal') highestPrio;
})
defsByAttr;
/* Properties. */
mkIf = condition: content:
@@ -1256,6 +1290,7 @@ private //
importJSON
importTOML
mergeDefinitions
mergeAttrDefinitionsWithPrio
mergeOptionDecls # should be private?
mkAfter
mkAliasAndWrapDefinitions

View File

@@ -61,6 +61,8 @@ checkConfigError() {
# Shorthand meta attribute does not duplicate the config
checkConfigOutput '^"one two"$' config.result ./shorthand-meta.nix
checkConfigOutput '^true$' config.result ./test-mergeAttrDefinitionsWithPrio.nix
# Check boolean option.
checkConfigOutput '^false$' config.enable ./declare-enable.nix
checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./define-enable.nix

View File

@@ -0,0 +1,21 @@
{ lib, options, ... }:
let
defs = lib.modules.mergeAttrDefinitionsWithPrio options._module.args;
assertLazy = pos: throw "${pos.file}:${toString pos.line}:${toString pos.column}: The test must not evaluate this the assertLazy thunk, but it did. Unexpected strictness leads to unexpected errors and performance problems.";
in
{
options.result = lib.mkOption { };
config._module.args = {
default = lib.mkDefault (assertLazy __curPos);
regular = null;
force = lib.mkForce (assertLazy __curPos);
unused = assertLazy __curPos;
};
config.result =
assert defs.default.highestPrio == (lib.mkDefault (assertLazy __curPos)).priority;
assert defs.regular.highestPrio == lib.modules.defaultOverridePriority;
assert defs.force.highestPrio == (lib.mkForce (assertLazy __curPos)).priority;
true;
}

View File

@@ -55,11 +55,6 @@ let
description = "An evaluation of Nixpkgs; the top level attribute set of packages";
};
# Whether `pkgs` was constructed by this module - not if nixpkgs.pkgs or
# _module.args.pkgs is set. However, determining whether _module.args.pkgs
# is defined elsewhere does not seem feasible.
constructedByMe = !opt.pkgs.isDefined;
hasBuildPlatform = opt.buildPlatform.highestPrio < (mkOptionDefault {}).priority;
hasHostPlatform = opt.hostPlatform.isDefined;
hasPlatform = hasHostPlatform || hasBuildPlatform;
@@ -337,10 +332,28 @@ in
config = {
_module.args = {
pkgs = finalPkgs.__splicedPackages;
pkgs =
# We explicitly set the default override priority, so that we do not need
# to evaluate finalPkgs in case an override is placed on `_module.args.pkgs`.
# After all, to determine a definition priority, we need to evaluate `._type`,
# which is somewhat costly for Nixpkgs. With an explicit priority, we only
# evaluate the wrapper to find out that the priority is lower, and then we
# don't need to evaluate `finalPkgs`.
lib.mkOverride lib.modules.defaultOverridePriority
finalPkgs.__splicedPackages;
};
assertions = [
assertions = let
# Whether `pkgs` was constructed by this module. This is false when any of
# nixpkgs.pkgs or _module.args.pkgs is set.
constructedByMe =
# We set it with default priority and it can not be merged, so if the
# pkgs module argument has that priority, it's from us.
(lib.modules.mergeAttrDefinitionsWithPrio options._module.args).pkgs.highestPrio
== lib.modules.defaultOverridePriority
# Although, if nixpkgs.pkgs is set, we did forward it, but we did not construct it.
&& !opt.pkgs.isDefined;
in [
(
let
nixosExpectedSystem =

View File

@@ -16,11 +16,11 @@
stdenv.mkDerivation rec {
pname = "confy";
version = "0.6.4";
version = "0.6.5";
src = fetchurl {
url = "https://git.sr.ht/~fabrixxm/confy/archive/${version}.tar.gz";
sha256 = "0v74pdyihj7r9gb3k2rkvbphan27ajlvycscd8xzrnsv74lcmbpm";
sha256 = "sha256-zfuwOZBSGQzJUc36M6C5wSHarLbPFqayQVFo+WbVo7k=";
};
nativeBuildInputs = [

View File

@@ -29,11 +29,11 @@
firefox-beta = buildMozillaMach rec {
pname = "firefox-beta";
version = "115.0b7";
version = "115.0b9";
applicationName = "Mozilla Firefox Beta";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "4ae6b74e7a47c06c3630c911d5bbcd6c390f1462f4335c8fd084cf455675c88872864390e22847da16564484b70fbac09625015fc6a4cf10a01ed8052016991e";
sha512 = "26e030143c09daef8fcdde55ebd020828025694d354e5f1e51308275af07b4c44aef325bb74e5e289b89d469822b2380a4abf47103972f46f12dfd9ac8fad830";
};
meta = {
@@ -56,12 +56,12 @@
firefox-devedition = buildMozillaMach rec {
pname = "firefox-devedition";
version = "115.0b7";
version = "115.0b9";
applicationName = "Mozilla Firefox Developer Edition";
branding = "browser/branding/aurora";
src = fetchurl {
url = "mirror://mozilla/devedition/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "f360ca7c5eb69d16a54b37a95195f4981c19e7e081cf7d494dafc1838ec69f2beabae5eaed23b0b551e71b32e3d0213383bc43e63416d390aa453bfa8b0f1993";
sha512 = "8d2a0dc2c64f8fc846077165ea0c97cae04a85db9ffcd23fbf933b25f165ecd85727ba2f432842f2d2f41c5b5bef5eb4ae2536d8492888c334aba0dcec278c47";
};
meta = {

View File

@@ -1,11 +1,11 @@
{
"packageVersion": "114.0.1-2",
"packageVersion": "114.0.2-1",
"source": {
"rev": "114.0.1-2",
"sha256": "1di8kfzc27wz89cfq8xgs17lyayikpmqwn5npdzllzppp0dx0894"
"rev": "114.0.2-1",
"sha256": "0snwwr15kd69p6xjbwcika8w04q0qgx6qmv5gy01y9gjc0hcv10q"
},
"firefox": {
"version": "114.0.1",
"sha512": "d422982e0271a68aa8064977b3a6b6f9412a30e7261ba06385c416e00e8ba0eb488d81a8929355fc92d35469d3308ec928f00e4de7248ed6390d5d900d7bce8f"
"version": "114.0.2",
"sha512": "1d514d09c6b964b96c6d52d54b89a89a92d53a6fe669e16a6370346c980db4d0ac6c502fa89219c71b680566b9eb982e9b3191c21f81d7326f34f6c837c0a872"
}
}

View File

@@ -0,0 +1,18 @@
{ lib, fetchurl, buildLinux, ... } @ args:
with lib;
buildLinux (args // rec {
version = "6.4";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = versions.pad 3 version;
# branchVersion needs to be x.y
extraMeta.branch = versions.majorMinor version;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz";
sha256 = "sha256-j6BYjwws7KRMrHeg45ukjJ8AprncaXYcAqXT76yNp/M=";
};
} // (args.argsOverride or { }))

View File

@@ -1,6 +1,7 @@
{ lib
, llvmPackages
, fetchFromGitHub
, fetchpatch
, cmake
, ninja
, python3
@@ -27,14 +28,15 @@ let
else llvmPackages.stdenv).mkDerivation;
in mkDerivation rec {
pname = "clickhouse";
version = "23.3.3.52";
version = "23.3.5.9";
src = fetchFromGitHub rec {
owner = "ClickHouse";
repo = "ClickHouse";
rev = "v${version}-lts";
fetchSubmodules = true;
hash = "sha256-fVwwMj0WbyCbe4WfpYMGVM6vXFgHsjg9MUZbNyd+a/w=";
name = "clickhouse-${rev}.tar.gz";
hash = "sha256-soF0L69oi95r0zgzPL0DfDhhXfRKekN5u/4+/mt8QwM=";
postFetch = ''
# delete files that make the source too big
rm -rf $out/contrib/llvm-project/llvm/test
@@ -44,6 +46,18 @@ in mkDerivation rec {
# fix case insensitivity on macos https://github.com/NixOS/nixpkgs/issues/39308
rm -rf $out/contrib/sysroot/linux-*
rm -rf $out/contrib/liburing/man
# compress to not exceed the 2GB output limit
# try to make a deterministic tarball
tar -I 'gzip -n' \
--sort=name \
--mtime=1970-01-01 \
--owner=0 --group=0 \
--numeric-owner --mode=go=rX,u+rw,a-s \
--transform='s@^@source/@S' \
-cf temp -C "$out" .
rm -r "$out"
mv temp "$out"
'';
};
@@ -142,9 +156,11 @@ in mkDerivation rec {
"-DENABLE_TESTS=OFF"
"-DCOMPILER_CACHE=disabled"
"-DENABLE_EMBEDDED_COMPILER=ON"
"-DWERROR=OFF"
];
# https://github.com/ClickHouse/ClickHouse/issues/49988
hardeningDisable = [ "fortify" ];
postInstall = ''
rm -rf $out/share/clickhouse-test

View File

@@ -7,11 +7,11 @@
stdenv.mkDerivation rec {
pname = "knot-dns";
version = "3.2.7";
version = "3.2.8";
src = fetchurl {
url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
sha256 = "d3b7872ac8aa80f7f54ddb1bb3b1e2f90ec55f7270a2c4a9338eab42b7d2767b";
sha256 = "ef419a428f327def77780bc90eda763b51e6121fe548543da84b9eb96a261a6e";
};
outputs = [ "bin" "out" "dev" ];
@@ -29,12 +29,6 @@ stdenv.mkDerivation rec {
./runtime-deps.patch
];
# Upstream mistake in 3.2.7: too strict constraint.
postPatch = ''
substituteInPlace configure.ac \
--replace 'libngtcp2 = 0.13.0' 'libngtcp2 = 0.13.1'
'';
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [
gnutls liburcu libidn2 libunistring

View File

@@ -927,6 +927,7 @@ mapAliases ({
linuxPackages_6_1 = linuxKernel.packages.linux_6_1;
linuxPackages_6_2 = linuxKernel.packages.linux_6_2;
linuxPackages_6_3 = linuxKernel.packages.linux_6_3;
linuxPackages_6_4 = linuxKernel.packages.linux_6_4;
linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14;
linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1;
linuxPackages_rpi02w = linuxKernel.packages.linux_rpi3;
@@ -950,6 +951,7 @@ mapAliases ({
linux_6_1 = linuxKernel.kernels.linux_6_1;
linux_6_2 = linuxKernel.kernels.linux_6_2;
linux_6_3 = linuxKernel.kernels.linux_6_3;
linux_6_4 = linuxKernel.kernels.linux_6_4;
linuxPackages_mptcp = throw "'linuxPackages_mptcp' has been moved to https://github.com/teto/mptcp-flake"; # Converted to throw 2022-10-04
linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake"; # Converted to throw 2022-10-04
linux_mptcp_95 = throw "'linux_mptcp_95' has been moved to https://github.com/teto/mptcp-flake"; # Converted to throw 2022-10-04

View File

@@ -187,6 +187,13 @@ in {
];
};
linux_6_4 = callPackage ../os-specific/linux/kernel/linux-6.4.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
};
linux_testing = let
testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {
kernelPatches = [
@@ -570,6 +577,7 @@ in {
linux_5_15 = recurseIntoAttrs (packagesFor kernels.linux_5_15);
linux_6_1 = recurseIntoAttrs (packagesFor kernels.linux_6_1);
linux_6_3 = recurseIntoAttrs (packagesFor kernels.linux_6_3);
linux_6_4 = recurseIntoAttrs (packagesFor kernels.linux_6_4);
} // lib.optionalAttrs config.allowAliases {
linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11"; # Added 2022-11-08
linux_5_18 = throw "linux 5.18 was removed because it reached its end of life upstream"; # Added 2022-09-17
@@ -638,7 +646,7 @@ in {
packageAliases = {
linux_default = packages.linux_6_1;
# Update this when adding the newest kernel major version!
linux_latest = packages.linux_6_3;
linux_latest = packages.linux_6_4;
linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake";
linux_rt_default = packages.linux_rt_5_4;
linux_rt_latest = packages.linux_rt_6_1;

View File

@@ -9872,10 +9872,10 @@ with self; {
FinanceQuote = buildPerlPackage {
pname = "Finance-Quote";
version = "1.55";
version = "1.56";
src = fetchurl {
url = "mirror://cpan/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.55.tar.gz";
hash = "sha256-4uAAtnxmtq9Q1HYYWEkhEFEKVaAwqJEBfUDH3iGLdI8=";
url = "mirror://cpan/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.56.tar.gz";
hash = "sha256-ER1vBY5kZLdIXAGPidDhiR/OC5aNnG+6G/JU1hLHpKs=";
};
buildInputs = [ DateManip DateRange DateSimple DateTime DateTimeFormatISO8601 StringUtil TestKwalitee TestPerlCritic TestPod TestPodCoverage ];
propagatedBuildInputs = [ DateTimeFormatStrptime Encode HTMLTableExtract HTMLTokeParserSimple HTMLTree HTMLTreeBuilderXPath HTTPCookies JSON IOCompress LWPProtocolHttps Readonly StringUtil SpreadsheetXLSX TextTemplate TryTiny WebScraper XMLLibXML libwwwperl ];