From 9b0773d06a419b7a828bb211ba4be774c6e35285 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:36 -0800 Subject: [PATCH 001/123] test.cuda: fix broken eval --- pkgs/test/cuda/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/test/cuda/default.nix b/pkgs/test/cuda/default.nix index 7989e4e2b7d2b..f2d2c6c55cb83 100644 --- a/pkgs/test/cuda/default.nix +++ b/pkgs/test/cuda/default.nix @@ -25,4 +25,6 @@ rec { cuda-library-samples_cudatoolkit_11_2 cuda-library-samples_cudatoolkit_11_3 cuda-library-samples_cudatoolkit_11_4; + + __attrsFailEvaluation = true; } From 644e1c6c43c50bab82772f2bd29e7f09565254db Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 17:52:18 -0800 Subject: [PATCH 002/123] pkgs/top-level/all-packages.nix: remove self-referential top-level attributes --- pkgs/top-level/all-packages.nix | 9 ++++++--- pkgs/top-level/perl-packages.nix | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eeeaddc5e6980..f66444f304a73 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17910,8 +17910,8 @@ with pkgs; python27Packages = python27.pkgs; python38Packages = python38.pkgs; python39Packages = python39.pkgs; - python310Packages = recurseIntoAttrs python310.pkgs; - python311Packages = recurseIntoAttrs python311.pkgs; + python310Packages = builtins.removeAttrs (recurseIntoAttrs python310.pkgs) [ "pythonPackages" ]; + python311Packages = builtins.removeAttrs (recurseIntoAttrs python311.pkgs) [ "pythonPackages" ]; python312Packages = python312.pkgs; python313Packages = python313.pkgs; pypyPackages = pypy.pkgs; @@ -34746,7 +34746,10 @@ with pkgs; picosnitch = callPackage ../tools/networking/picosnitch { }; - pidginPackages = recurseIntoAttrs (callPackage ../applications/networking/instant-messengers/pidgin/pidgin-plugins { }); + pidginPackages = + builtins.removeAttrs + (recurseIntoAttrs (callPackage ../applications/networking/instant-messengers/pidgin/pidgin-plugins { })) + ["pidginPackages"]; inherit (pidginPackages) pidgin; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 0796f85677e84..0ac262d7ce4a8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -23,7 +23,7 @@ in with self; { inherit perl; - perlPackages = self; + perlPackages = builtins.removeAttrs self ["perlPackages"]; # Check whether a derivation provides a perl module. hasPerlModule = drv: drv ? perlModule ; From 0e77c808cf3f44aabef0c38da4f2eba73a450fb2 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 21 Nov 2023 22:55:15 -0800 Subject: [PATCH 003/123] pkgs/top-level/release-outpaths.nix: vendor from ofborg This commit vendors `outpaths.nix` from ofborg commit 74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491 --- pkgs/top-level/release-outpaths.nix | 72 +++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 pkgs/top-level/release-outpaths.nix diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix new file mode 100644 index 0000000000000..ff0fbdb80ea3c --- /dev/null +++ b/pkgs/top-level/release-outpaths.nix @@ -0,0 +1,72 @@ +#!/usr/bin/env nix-shell +# When using as a callable script, passing `--argstr path some/path` overrides $PWD. +#!nix-shell -p nix -i "nix-env -qaP --no-name --out-path --arg checkMeta true --argstr path $PWD -f" + +# Vendored from: +# https://raw.githubusercontent.com/NixOS/ofborg/74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491/ofborg/src/outpaths.nix +{ checkMeta +, path ? ./. +}: +let + lib = import (path + "/lib"); + hydraJobs = import (path + "/pkgs/top-level/release.nix") + # Compromise: accuracy vs. resources needed for evaluation. + { + supportedSystems = [ + "aarch64-linux" + "aarch64-darwin" + #"i686-linux" # !!! + "x86_64-linux" + "x86_64-darwin" + ]; + + nixpkgsArgs = { + config = { + allowAliases = false; + allowBroken = true; + allowUnfree = true; + allowInsecurePredicate = x: true; + checkMeta = checkMeta; + + handleEvalIssue = reason: errormsg: + let + fatalErrors = [ + "unknown-meta" + "broken-outputs" + ]; + in + if builtins.elem reason fatalErrors + then abort errormsg + else true; + + inHydra = true; + }; + }; + }; + recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; }; + + # hydraJobs leaves recurseForDerivations as empty attrmaps; + # that would break nix-env and we also need to recurse everywhere. + tweak = lib.mapAttrs + (name: val: + if name == "recurseForDerivations" then true + else if lib.isAttrs val && val.type or null != "derivation" + then recurseIntoAttrs (tweak val) + else val + ); + + # Some of these contain explicit references to platform(s) we want to avoid; + # some even (transitively) depend on ~/.nixpkgs/config.nix (!) + blacklist = [ + "tarball" + "metrics" + "manual" + "darwin-tested" + "unstable" + "stdenvBootstrapTools" + "moduleSystem" + "lib-tests" # these just confuse the output + ]; + +in +tweak (builtins.removeAttrs hydraJobs blacklist) From 29e9d8b4e6970db3765a559c97face05ddd7126d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 22:26:53 -0800 Subject: [PATCH 004/123] pkgs/top-level/release-outpaths.nix: adjust default path value --- pkgs/top-level/release-outpaths.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index ff0fbdb80ea3c..72af7ac764ab8 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -5,7 +5,7 @@ # Vendored from: # https://raw.githubusercontent.com/NixOS/ofborg/74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491/ofborg/src/outpaths.nix { checkMeta -, path ? ./. +, path ? ./../.. }: let lib = import (path + "/lib"); From 80284283bb343060163e384bbc0f768b32fdcde3 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 17:10:24 -0800 Subject: [PATCH 005/123] pkgs/top-level/release-outpaths.nix: add attrNamesOnly option --- pkgs/top-level/release-outpaths.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 72af7ac764ab8..fbb2a53e46169 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -6,12 +6,16 @@ # https://raw.githubusercontent.com/NixOS/ofborg/74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491/ofborg/src/outpaths.nix { checkMeta , path ? ./../.. + +# used by pkgs/top-level/release-attrnames-superset.nix +, attrNamesOnly ? false }: let lib = import (path + "/lib"); hydraJobs = import (path + "/pkgs/top-level/release.nix") # Compromise: accuracy vs. resources needed for evaluation. { + inherit attrNamesOnly; supportedSystems = [ "aarch64-linux" "aarch64-darwin" @@ -29,6 +33,7 @@ let checkMeta = checkMeta; handleEvalIssue = reason: errormsg: + if attrNamesOnly then true else let fatalErrors = [ "unknown-meta" From 9f3cda0ddfa06e591241ece998afd2523baae7d8 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 26 Nov 2023 15:51:08 -0800 Subject: [PATCH 006/123] pkgs/top-level/release-outpaths.nix: simplify invocation --- pkgs/top-level/release-outpaths.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index fbb2a53e46169..95b7aaafc5dbb 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -1,9 +1,10 @@ #!/usr/bin/env nix-shell # When using as a callable script, passing `--argstr path some/path` overrides $PWD. -#!nix-shell -p nix -i "nix-env -qaP --no-name --out-path --arg checkMeta true --argstr path $PWD -f" +#!nix-shell -p nix -i "nix-env -qaP --no-name --out-path --arg checkMeta true -f pkgs/top-level/release-outpaths.nix" # Vendored from: # https://raw.githubusercontent.com/NixOS/ofborg/74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491/ofborg/src/outpaths.nix + { checkMeta , path ? ./../.. From 5f61202f8bfd3d70177305216f39f73329814e8b Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 26 Nov 2023 17:27:31 -0800 Subject: [PATCH 007/123] pkgs/top-level/release-outpaths.nix: make systems parameter optional --- pkgs/top-level/release-outpaths.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 95b7aaafc5dbb..359070ccae5d6 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -10,6 +10,16 @@ # used by pkgs/top-level/release-attrnames-superset.nix , attrNamesOnly ? false + +# Set this to `null` to build for the currentSystem only, *and also* +# to omit the `.system-name` attrpath suffix +, systems ? [ + "aarch64-linux" + "aarch64-darwin" + #"i686-linux" # !!! + "x86_64-linux" + "x86_64-darwin" + ] }: let lib = import (path + "/lib"); @@ -17,14 +27,10 @@ let # Compromise: accuracy vs. resources needed for evaluation. { inherit attrNamesOnly; - supportedSystems = [ - "aarch64-linux" - "aarch64-darwin" - #"i686-linux" # !!! - "x86_64-linux" - "x86_64-darwin" - ]; - + supportedSystems = + if systems == null + then [ builtins.currentSystem ] + else systems; nixpkgsArgs = { config = { allowAliases = false; From bb13050e84e9a937d0fee17f46f9952013721651 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 26 Nov 2023 15:51:52 -0800 Subject: [PATCH 008/123] pkgs/top-level/release-outpaths.nix: add includeBroken parameter --- pkgs/top-level/release-outpaths.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 359070ccae5d6..3a9cf15247a28 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -6,6 +6,7 @@ # https://raw.githubusercontent.com/NixOS/ofborg/74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491/ofborg/src/outpaths.nix { checkMeta +, includeBroken ? true # set this to false to exclude meta.broken packages from the output , path ? ./../.. # used by pkgs/top-level/release-attrnames-superset.nix @@ -34,7 +35,7 @@ let nixpkgsArgs = { config = { allowAliases = false; - allowBroken = true; + allowBroken = includeBroken; allowUnfree = true; allowInsecurePredicate = x: true; checkMeta = checkMeta; @@ -49,6 +50,8 @@ let in if builtins.elem reason fatalErrors then abort errormsg + else if !includeBroken && builtins.elem reason [ "broken" ] + then throw "broken" else true; inHydra = true; From 24ee0c157eefba8a70c80c9a6c378714555ed971 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 17:10:45 -0800 Subject: [PATCH 009/123] pkgs/top-level/release.nix: add attrNamesOnly option --- pkgs/top-level/release.nix | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 9b5c601415202..f2b38b4a89645 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -37,9 +37,23 @@ "openssl-1.1.1w" ]; }; } + + # This flag, if set to true, will inhibit the use of `mapTestOn` + # and `release-lib.packagePlatforms`. Generally, it causes the + # resulting tree of attributes to *not* have a ".${system}" + # suffixed upon every job name like Hydra expects. + # + # This flag exists mainly for use by + # pkgs/top-level/release-attrnames-superset.nix; see that file for + # full details. The exact behavior of this flag may change; it + # should be considered an internal implementation detail of + # pkgs/top-level/. + # +, attrNamesOnly ? false }: -with import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; }; +let release-lib = import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; }; in +with release-lib; let @@ -239,9 +253,9 @@ let # 'nonPackageAttrs' and jobs pulled in from 'pkgs'. # Conflicts usually cause silent job drops like in # https://github.com/NixOS/nixpkgs/pull/182058 - jobs = lib.attrsets.unionOfDisjoint - nonPackageJobs - (mapTestOn ((packagePlatforms pkgs) // { + jobs = let + packagePlatforms = if attrNamesOnly then lib.id else release-lib.packagePlatforms; + packageJobs = { haskell.compiler = packagePlatforms pkgs.haskell.compiler; haskellPackages = packagePlatforms pkgs.haskellPackages; # Build selected packages (HLS) for multiple Haskell compilers to rebuild @@ -275,6 +289,14 @@ let darwin = packagePlatforms pkgs.darwin // { xcode = {}; }; - } )); + }; + mapTestOn-packages = + if attrNamesOnly + then pkgs // packageJobs + else mapTestOn ((packagePlatforms pkgs) // packageJobs); + in + lib.attrsets.unionOfDisjoint + nonPackageJobs + mapTestOn-packages; in jobs From eab3140181f57544408d0a7cd62db6b70f62ffa4 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:49:27 -0800 Subject: [PATCH 010/123] treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobs --- lib/types.nix | 1 + pkgs/applications/editors/eclipse/default.nix | 2 +- .../elisp-packages/elpa-devel-packages.nix | 2 +- .../emacs/elisp-packages/elpa-packages.nix | 2 +- .../emacs/elisp-packages/manual-packages.nix | 2 + .../emacs/elisp-packages/melpa-packages.nix | 3 +- .../emacs/elisp-packages/nongnu-packages.nix | 4 +- .../editors/jetbrains/default.nix | 2 +- pkgs/desktops/gnome/extensions/default.nix | 3 + .../compilers/chicken/4/default.nix | 2 +- pkgs/development/compilers/rust/default.nix | 2 +- pkgs/development/compilers/swift/default.nix | 3 +- pkgs/development/haskell-modules/default.nix | 3 +- .../haskell-modules/make-package-set.nix | 4 +- .../interpreters/lua-5/default.nix | 3 +- .../libraries/qt-5/5.15/default.nix | 2 +- pkgs/test/default.nix | 4 +- pkgs/top-level/all-packages.nix | 62 ++++++++++--------- pkgs/top-level/beam-packages.nix | 2 + pkgs/top-level/coq-packages.nix | 34 +++++----- pkgs/top-level/cuda-packages.nix | 5 +- pkgs/top-level/java-packages.nix | 1 + pkgs/top-level/linux-kernels.nix | 9 ++- pkgs/top-level/pkg-config/tests.nix | 2 +- pkgs/top-level/qt5-packages.nix | 4 +- pkgs/top-level/release-python.nix | 2 +- 26 files changed, 97 insertions(+), 68 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index 5ffbecda5db39..0b063968e0ccc 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -67,6 +67,7 @@ let ; outer_types = rec { + __attrsFailEvaluation = true; isType = type: x: (x._type or "") == type; setType = typeName: value: value // { diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index b9bd9c0b9634d..3b1ae76a4168b 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -211,6 +211,6 @@ in rec { ### Plugins - plugins = callPackage ./plugins.nix { }; + plugins = callPackage ./plugins.nix { } // { __attrsFailEvaluation = true; }; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-devel-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-devel-packages.nix index ff5cce83103e5..b5752ee629e70 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/elpa-devel-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/elpa-devel-packages.nix @@ -85,4 +85,4 @@ self: let in elpaDevelPackages // { inherit elpaBuild; }); -in generateElpa { } +in (generateElpa { }) // { __attrsFailEvaluation = true; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix index 2a6cb016cdc8a..112445453abb4 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix @@ -181,4 +181,4 @@ self: let in elpaPackages // { inherit elpaBuild; }); -in generateElpa { } +in (generateElpa { }) // { __attrsFailEvaluation = true; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix index 117adcd47a9c4..4e9f54bf23f60 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix @@ -111,4 +111,6 @@ in emacsSessionManagement = self.session-management-for-emacs; rectMark = self.rect-mark; sunriseCommander = self.sunrise-commander; + + __attrsFailEvaluation = true; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix index cd45cfc787271..27b86956abc7a 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix @@ -714,4 +714,5 @@ let in lib.mapAttrs (n: v: if lib.hasAttr n overrides then overrides.${n} else v) super); in -generateMelpa { } +(generateMelpa { }) +// { __attrsFailEvaluation = true; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix index cd32a8bd39754..beca93ea4c35f 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix @@ -20,12 +20,12 @@ self: let generated ? ./nongnu-generated.nix }: let - imported = import generated { + imported = (import generated { callPackage = pkgs: args: self.callPackage pkgs (args // { # Use custom elpa url fetcher with fallback/uncompress fetchurl = buildPackages.callPackage ./fetchelpa.nix { }; }); - }; + }) // { __attrsFailEvaluation = true; }; super = imported; diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 2034da80c658d..f5fb2dcbf5267 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -595,6 +595,6 @@ in update-channel = products.webstorm.update-channel; }; - plugins = callPackage ./plugins { }; + plugins = callPackage ./plugins { } // { __attrsFailEvaluation = true; }; } diff --git a/pkgs/desktops/gnome/extensions/default.nix b/pkgs/desktops/gnome/extensions/default.nix index 686f8031ec865..bfb5f4ff33e63 100644 --- a/pkgs/desktops/gnome/extensions/default.nix +++ b/pkgs/desktops/gnome/extensions/default.nix @@ -35,6 +35,7 @@ let lib.trivial.pipe extensions [ (map (extension: lib.nameValuePair extension.extensionUuid extension)) builtins.listToAttrs + (attrs: attrs // { __attrsFailEvaluation = true; }) ]; # Map the list of extensions to an attrset based on the pname as key, which is more human readable than the UUID @@ -66,6 +67,7 @@ in rec { # Keep the last three versions in here gnomeExtensions = lib.trivial.pipe (gnome43Extensions // gnome44Extensions // gnome45Extensions) [ + (v: builtins.removeAttrs v [ "__attrsFailEvaluation" ]) # Apply some custom patches for automatically packaged extensions (callPackage ./extensionOverrides.nix {}) # Add all manually packaged extensions @@ -88,4 +90,5 @@ in rec { # Make the set "public" lib.recurseIntoAttrs ]; + } diff --git a/pkgs/development/compilers/chicken/4/default.nix b/pkgs/development/compilers/chicken/4/default.nix index de64d20d3e059..7502a7a9f1e72 100644 --- a/pkgs/development/compilers/chicken/4/default.nix +++ b/pkgs/development/compilers/chicken/4/default.nix @@ -3,7 +3,7 @@ let callPackage = newScope self; self = { - pkgs = self; + pkgs = self // { recurseForDerivations = false; }; fetchegg = callPackage ./fetchegg { }; diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index efd7042c230cf..f01dc8ecf1b94 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -61,7 +61,7 @@ in bootRustPlatform = makeRustPlatform bootstrapRustPackages; in { # Packages suitable for build-time, e.g. `build.rs`-type stuff. - buildRustPackages = (selectRustPackage buildPackages).packages.stable; + buildRustPackages = (selectRustPackage buildPackages).packages.stable // { __attrsFailEvaluation = true; }; # Analogous to stdenv rustPlatform = makeRustPlatform self.buildRustPackages; rustc = self.callPackage ./rustc.nix ({ diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index 0da2510f09a00..afb8ce39dcced 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -55,7 +55,8 @@ let darwin = pkgs.darwin.overrideScope (_: prev: { inherit apple_sdk; inherit (apple_sdk) Libsystem LibsystemCross libcharset libunwind objc4 configd IOKit Security; - CF = apple_sdk.CoreFoundation; + CF = apple_sdk.CoreFoundation // { __attrsFailEvaluation = true; }; + __attrsFailEvaluation = true; }); xcodebuild = pkgs.xcbuild.override { inherit (apple_sdk.frameworks) CoreServices CoreGraphics ImageIO; diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index 7bc1fa0f7e832..e766203bd1f0a 100644 --- a/pkgs/development/haskell-modules/default.nix +++ b/pkgs/development/haskell-modules/default.nix @@ -18,7 +18,8 @@ let haskellPackages = pkgs.callPackage makePackageSet { package-set = initialPackages; - inherit stdenv haskellLib ghc buildHaskellPackages extensible-self all-cabal-hashes; + inherit stdenv haskellLib ghc extensible-self all-cabal-hashes; + buildHaskellPackages = buildHaskellPackages // { __attrsFailEvaluation = true; }; }; platformConfigurations = lib.optionals stdenv.hostPlatform.isAarch [ diff --git a/pkgs/development/haskell-modules/make-package-set.nix b/pkgs/development/haskell-modules/make-package-set.nix index c39c934bed643..294ca295f22bf 100644 --- a/pkgs/development/haskell-modules/make-package-set.nix +++ b/pkgs/development/haskell-modules/make-package-set.nix @@ -614,7 +614,7 @@ in package-set { inherit pkgs lib callPackage; } self // { Type: [str] -> drv -> drv */ generateOptparseApplicativeCompletions = - self.callPackage ( + (self.callPackage ( { stdenv }: commands: @@ -623,7 +623,7 @@ in package-set { inherit pkgs lib callPackage; } self // { if stdenv.buildPlatform.canExecute stdenv.hostPlatform then lib.foldr haskellLib.__generateOptparseApplicativeCompletion pkg commands else pkg - ) { }; + ) { }) // { __attrsFailEvaluation = true; }; /* Modify given Haskell package to force GHC to employ the LLVM diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix index 2fda54bef530f..ce91b024ce841 100644 --- a/pkgs/development/interpreters/lua-5/default.nix +++ b/pkgs/development/interpreters/lua-5/default.nix @@ -65,7 +65,8 @@ let inherit (luaPackages) requiredLuaModules; }; withPackages = import ./with-packages.nix { inherit buildEnv luaPackages;}; - pkgs = luaPackages; + pkgs = let lp = luaPackages; + in lp // { luaPackages = lp.luaPackages // { __attrsFailEvaluation = true; }; }; interpreter = "${self}/bin/${executable}"; inherit executable luaversion; luaOnBuild = luaOnBuildForHost.override { inherit packageOverrides; self = luaOnBuild; }; diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 68a3e3531e19a..7a5ff60c9acbb 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -23,7 +23,7 @@ Check for any minor version changes. let - srcs = import ./srcs.nix { inherit lib fetchgit fetchFromGitHub; }; + srcs = import ./srcs.nix { inherit lib fetchgit fetchFromGitHub; } // { __attrsFailEvaluation = true; }; qtCompatVersion = srcs.qtbase.version; diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 9543e165a8053..c27acb1bd179d 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -123,11 +123,11 @@ with pkgs; macOSSierraShared = callPackage ./macos-sierra-shared {}; - cross = callPackage ./cross {}; + cross = callPackage ./cross {} // { __attrsFailEvaluation = true; }; php = recurseIntoAttrs (callPackages ./php {}); - pkg-config = recurseIntoAttrs (callPackage ../top-level/pkg-config/tests.nix { }); + pkg-config = recurseIntoAttrs (callPackage ../top-level/pkg-config/tests.nix { }) // { __recurseIntoDerivationForReleaseJobs = true; }; buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { }; importCargoLock = callPackage ../build-support/rust/test/import-cargo-lock { }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f66444f304a73..6cd2daa5ef71c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -116,7 +116,7 @@ with pkgs; # We don't want nix-env -q to enter this, because all of these are aliases. dontRecurseIntoAttrs ( import ./pkg-config/defaultPkgConfigPackages.nix pkgs - ); + ) // { __attrsFailEvaluation = true; }; ### Nixpkgs maintainer tools @@ -159,6 +159,7 @@ with pkgs; system = stdenv.hostPlatform.system; callTest = config: config.test.driver; }; + __attrsFailEvaluation = true; }; ### BUILD SUPPORT @@ -881,7 +882,7 @@ with pkgs; dockerTools = callPackage ../build-support/docker { writePython3 = buildPackages.writers.writePython3; - }; + } // { __attrsFailEvaluation = true; }; fakeNss = callPackage ../build-support/fake-nss { }; @@ -7323,7 +7324,7 @@ with pkgs; # TODO: try upgrading once there is a cuDNN release supporting CUDA 12. No # such cuDNN release as of 2023-01-10. - cudaPackages = recurseIntoAttrs cudaPackages_11; + cudaPackages = recurseIntoAttrs cudaPackages_11 // { __attrsFailEvaluation = false; }; # TODO: move to alias cudatoolkit = cudaPackages.cudatoolkit; @@ -10341,9 +10342,9 @@ with pkgs; inherit (callPackages ../build-support/node/fetch-npm-deps { }) fetchNpmDeps prefetch-npm-deps; - nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs; + nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs // { __attrsFailEvaluation = true; }; - nodePackages = dontRecurseIntoAttrs nodejs.pkgs; + nodePackages = dontRecurseIntoAttrs nodejs.pkgs // { __attrsFailEvaluation = true; }; node2nix = nodePackages.node2nix; @@ -16261,7 +16262,8 @@ with pkgs; # Prefer native-bignum to avoid linking issues with gmp else if stdenv.hostPlatform.isStatic then haskell.packages.native-bignum.ghc94 - else haskell.packages.ghc94); + else haskell.packages.ghc94) + // { __recurseIntoDerivationForReleaseJobs = true; }; # haskellPackages.ghc is build->host (it exposes the compiler used to build the # set, similarly to stdenv.cc), but pkgs.ghc should be host->target to be more @@ -16845,7 +16847,7 @@ with pkgs; ocamlPackages = ocaml-ng.ocamlPackages_4_14; }; - ocaml-ng = callPackage ./ocaml-packages.nix { }; + ocaml-ng = callPackage ./ocaml-packages.nix { } // { __attrsFailEvaluation = true; }; ocaml = ocamlPackages.ocaml; ocamlPackages = recurseIntoAttrs ocaml-ng.ocamlPackages; @@ -17622,8 +17624,9 @@ with pkgs; inherit (beam.packages.erlang) erlang-ls erlfmt elvis-erlang rebar rebar3 rebar3WithPlugins - fetchHex beamPackages + fetchHex lfe lfe_2_1; + beamPackages = beam.packages.erlang // { __attrsFailEvaluation = true; }; expr = callPackage ../development/interpreters/expr { }; @@ -17907,19 +17910,19 @@ with pkgs; # List of extensions with overrides to apply to all Python package sets. pythonPackagesExtensions = [ ]; # Python package sets. - python27Packages = python27.pkgs; - python38Packages = python38.pkgs; - python39Packages = python39.pkgs; + python27Packages = python27.pkgs // { __attrsFailEvaluation = true; }; + python38Packages = python38.pkgs // { __attrsFailEvaluation = true; }; + python39Packages = python39.pkgs // { __attrsFailEvaluation = true; }; python310Packages = builtins.removeAttrs (recurseIntoAttrs python310.pkgs) [ "pythonPackages" ]; python311Packages = builtins.removeAttrs (recurseIntoAttrs python311.pkgs) [ "pythonPackages" ]; - python312Packages = python312.pkgs; - python313Packages = python313.pkgs; - pypyPackages = pypy.pkgs; - pypy2Packages = pypy2.pkgs; - pypy27Packages = pypy27.pkgs; - pypy3Packages = pypy3.pkgs; - pypy39Packages = pypy39.pkgs; - pypy310Packages = pypy310.pkgs; + python312Packages = python312.pkgs // { __attrsFailEvaluation = true; }; + python313Packages = python313.pkgs // { __attrsFailEvaluation = true; }; + pypyPackages = pypy.pkgs // { __attrsFailEvaluation = true; }; + pypy2Packages = pypy2.pkgs // { __attrsFailEvaluation = true; }; + pypy27Packages = pypy27.pkgs // { __attrsFailEvaluation = true; }; + pypy3Packages = pypy3.pkgs // { __attrsFailEvaluation = true; }; + pypy39Packages = pypy39.pkgs // { __attrsFailEvaluation = true; }; + pypy310Packages = pypy310.pkgs // { __attrsFailEvaluation = true; }; py3c = callPackage ../development/libraries/py3c { }; @@ -24673,9 +24676,9 @@ with pkgs; stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; }); - libsForQt5 = recurseIntoAttrs (import ./qt5-packages.nix { + libsForQt5 = (recurseIntoAttrs (import ./qt5-packages.nix { inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget; - }); + })) // { __recurseIntoDerivationForReleaseJobs = true; }; # plasma5Packages maps to the Qt5 packages set that is used to build the plasma5 desktop plasma5Packages = libsForQt5; @@ -25985,11 +25988,11 @@ with pkgs; }; lispPackages = quicklispPackages // - (lispPackagesFor (wrapLisp_old sbcl)); + (lispPackagesFor (wrapLisp_old sbcl)) // { __attrsFailEvaluation = true; }; quicklispPackagesFor = clwrapper: callPackage ../development/lisp-modules-obsolete/quicklisp-to-nix.nix { inherit clwrapper; - }; + } // { __attrsFailEvaluation = true; }; quicklispPackagesClisp = dontRecurseIntoAttrs (quicklispPackagesFor (wrapLisp_old clisp)); quicklispPackagesSBCL = dontRecurseIntoAttrs (quicklispPackagesFor (wrapLisp_old sbcl)); quicklispPackagesECL = dontRecurseIntoAttrs (quicklispPackagesFor (wrapLisp_old ecl)); @@ -25999,7 +26002,8 @@ with pkgs; quicklispPackages = quicklispPackagesSBCL; # Alternative lisp-modules implementation - lispPackages_new = callPackage ../development/lisp-modules-new-obsolete/lisp-packages.nix {}; + lispPackages_new = callPackage ../development/lisp-modules-new-obsolete/lisp-packages.nix {} + // { __attrsFailEvaluation = true; }; ## End of DEPRECATED @@ -26145,9 +26149,9 @@ with pkgs; rstudioServerWrapper = rstudioWrapper.override { rstudio = rstudio-server; }; - rPackages = dontRecurseIntoAttrs (callPackage ../development/r-modules { + rPackages = (dontRecurseIntoAttrs (callPackage ../development/r-modules { overrides = (config.rPackageOverrides or (_: {})) pkgs; - }); + })) // { __attrsFailEvaluation = true; }; ### SERVERS @@ -31374,7 +31378,7 @@ with pkgs; # This alias should live in aliases.nix but that would cause Hydra not to evaluate/build the packages. # If you turn this into "real" alias again, please add it to pkgs/top-level/packages-config.nix again too - emacsPackages = emacs.pkgs; + emacsPackages = emacs.pkgs // { __recurseIntoDerivationForReleaseJobs = true; }; emptty = callPackage ../applications/display-managers/emptty { }; @@ -33826,9 +33830,9 @@ with pkgs; mop = callPackage ../applications/misc/mop { }; - mopidyPackages = callPackages ../applications/audio/mopidy { + mopidyPackages = (callPackages ../applications/audio/mopidy { python = python3; - }; + }) // { __attrsFailEvaluation = true; }; inherit (mopidyPackages) mopidy diff --git a/pkgs/top-level/beam-packages.nix b/pkgs/top-level/beam-packages.nix index ff9d1f62ab1f3..62ab2a63ae746 100644 --- a/pkgs/top-level/beam-packages.nix +++ b/pkgs/top-level/beam-packages.nix @@ -101,4 +101,6 @@ in erlang_25 = self.packagesWith self.interpreters.erlang_25; erlang_24 = self.packagesWith self.interpreters.erlang_24; } // packagesAliases; + + __attrsFailEvaluation = true; } diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index cf3817a3d7e46..64cbe925b5189 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -8,7 +8,7 @@ let mkCoqPackages' = self: coq: let callPackage = self.callPackage; in { inherit coq lib; - coqPackages = self; + coqPackages = self // { coqPackages = self.coqPackages // { recurseForDerivations = false; }; }; metaFetch = import ../build-support/coq/meta-fetch/default.nix {inherit lib stdenv fetchzip; }; @@ -190,21 +190,23 @@ in rec { coq_8_17 = mkCoq "8.17"; coq_8_18 = mkCoq "8.18"; - coqPackages_8_5 = mkCoqPackages coq_8_5; - coqPackages_8_6 = mkCoqPackages coq_8_6; - coqPackages_8_7 = mkCoqPackages coq_8_7; - coqPackages_8_8 = mkCoqPackages coq_8_8; - coqPackages_8_9 = mkCoqPackages coq_8_9; - coqPackages_8_10 = mkCoqPackages coq_8_10; - coqPackages_8_11 = mkCoqPackages coq_8_11; - coqPackages_8_12 = mkCoqPackages coq_8_12; - coqPackages_8_13 = mkCoqPackages coq_8_13; - coqPackages_8_14 = mkCoqPackages coq_8_14; - coqPackages_8_15 = mkCoqPackages coq_8_15; - coqPackages_8_16 = mkCoqPackages coq_8_16; - coqPackages_8_17 = mkCoqPackages coq_8_17; - coqPackages_8_18 = mkCoqPackages coq_8_18; - coqPackages = recurseIntoAttrs coqPackages_8_18; + coqPackages_8_5 = mkCoqPackages coq_8_5 // { __attrsFailEvaluation = true; }; + coqPackages_8_6 = mkCoqPackages coq_8_6 // { __attrsFailEvaluation = true; }; + coqPackages_8_7 = mkCoqPackages coq_8_7 // { __attrsFailEvaluation = true; }; + coqPackages_8_8 = mkCoqPackages coq_8_8 // { __attrsFailEvaluation = true; }; + coqPackages_8_9 = mkCoqPackages coq_8_9 // { __attrsFailEvaluation = true; }; + coqPackages_8_10 = mkCoqPackages coq_8_10 // { __attrsFailEvaluation = true; }; + coqPackages_8_11 = mkCoqPackages coq_8_11 // { __attrsFailEvaluation = true; }; + coqPackages_8_12 = mkCoqPackages coq_8_12 // { __attrsFailEvaluation = true; }; + coqPackages_8_13 = mkCoqPackages coq_8_13 // { __attrsFailEvaluation = true; }; + coqPackages_8_14 = mkCoqPackages coq_8_14 // { __attrsFailEvaluation = true; }; + coqPackages_8_15 = mkCoqPackages coq_8_15 // { __attrsFailEvaluation = true; }; + coqPackages_8_16 = mkCoqPackages coq_8_16 // { __attrsFailEvaluation = true; }; + coqPackages_8_17 = mkCoqPackages coq_8_17 // { __attrsFailEvaluation = true; }; + coqPackages_8_18 = mkCoqPackages coq_8_18 // { __attrsFailEvaluation = true; }; + coqPackages = + let cp = recurseIntoAttrs coqPackages_8_18; + in cp // { coqPackages = cp.coqPackages // { __attrsFailEvaluation = true; }; } // { __recurseIntoDerivationForReleaseJobs = true; }; coq = coqPackages.coq; } diff --git a/pkgs/top-level/cuda-packages.nix b/pkgs/top-level/cuda-packages.nix index a2f49a98ccd53..100d3131b175e 100644 --- a/pkgs/top-level/cuda-packages.nix +++ b/pkgs/top-level/cuda-packages.nix @@ -1,6 +1,7 @@ { lib , pkgs , cudaVersion +, __attrsFailEvaluation ? true }: with lib; @@ -12,7 +13,9 @@ let inherit cudaVersion; cudaMajorVersion = versions.major final.cudaVersion; cudaMajorMinorVersion = lib.versions.majorMinor final.cudaVersion; - inherit lib pkgs; + inherit lib; + pkgs = pkgs // { __attrsFailEvaluation = true; }; + inherit __attrsFailEvaluation; addBuildInputs = drv: buildInputs: drv.overrideAttrs (oldAttrs: { buildInputs = (oldAttrs.buildInputs or []) ++ buildInputs; diff --git a/pkgs/top-level/java-packages.nix b/pkgs/top-level/java-packages.nix index a4bafcc71dd15..77a431d100a6d 100644 --- a/pkgs/top-level/java-packages.nix +++ b/pkgs/top-level/java-packages.nix @@ -35,6 +35,7 @@ in { else package-darwin; in { inherit package-linux package-darwin; + __attrsFailEvaluation = true; jdk-hotspot = callPackage package.jdk-hotspot {}; jre-hotspot = callPackage package.jre-hotspot {}; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index efd25b37fa60e..5fa0ca87d5d92 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -395,7 +395,8 @@ in { nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; - nvidiaPackages = dontRecurseIntoAttrs (lib.makeExtensible (_: callPackage ../os-specific/linux/nvidia-x11 { })); + nvidiaPackages = dontRecurseIntoAttrs (lib.makeExtensible (_: callPackage ../os-specific/linux/nvidia-x11 { })) + // { __attrsFailEvaluation = true; }; nvidia_x11 = nvidiaPackages.stable; nvidia_x11_beta = nvidiaPackages.beta; @@ -586,6 +587,7 @@ in { linux_6_1 = recurseIntoAttrs (packagesFor kernels.linux_6_1); linux_6_5 = recurseIntoAttrs (packagesFor kernels.linux_6_5); linux_6_6 = recurseIntoAttrs (packagesFor kernels.linux_6_6); + __attrsFailEvaluation = true; } // 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_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11"; # Added 2023-10-11 @@ -603,6 +605,7 @@ in { linux_rt_5_10 = packagesFor kernels.linux_rt_5_10; linux_rt_5_15 = packagesFor kernels.linux_rt_5_15; linux_rt_6_1 = packagesFor kernels.linux_rt_6_1; + __attrsFailEvaluation = true; }; rpiPackages = { @@ -610,6 +613,7 @@ in { linux_rpi2 = packagesFor kernels.linux_rpi2; linux_rpi3 = packagesFor kernels.linux_rpi3; linux_rpi4 = packagesFor kernels.linux_rpi4; + __attrsFailEvaluation = true; }; packages = recurseIntoAttrs (vanillaPackages // rtPackages // rpiPackages // { @@ -637,6 +641,7 @@ in { linux_libre = recurseIntoAttrs (packagesFor kernels.linux_libre); linux_latest_libre = recurseIntoAttrs (packagesFor kernels.linux_latest_libre); + __recurseIntoDerivationForReleaseJobs = true; } // lib.optionalAttrs config.allowAliases { linux_5_18_hardened = throw "linux 5.18 was removed because it has reached its end of life upstream"; linux_5_19_hardened = throw "linux 5.19 was removed because it has reached its end of life upstream"; @@ -651,7 +656,7 @@ in { 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; - }; + } // { __attrsFailEvaluation = true; }; manualConfig = callPackage ../os-specific/linux/kernel/manual-config.nix {}; diff --git a/pkgs/top-level/pkg-config/tests.nix b/pkgs/top-level/pkg-config/tests.nix index ec1d445c5903b..786e2ecc534b8 100644 --- a/pkgs/top-level/pkg-config/tests.nix +++ b/pkgs/top-level/pkg-config/tests.nix @@ -17,5 +17,5 @@ let }; in lib.recurseIntoAttrs { - defaultPkgConfigPackages = allPkgs.callPackage ./test-defaultPkgConfigPackages.nix { }; + defaultPkgConfigPackages = allPkgs.callPackage ./test-defaultPkgConfigPackages.nix { } // { __recurseIntoDerivationForReleaseJobs = true; }; } diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index a9e25eb54a8ea..a6c51b6c4d0cc 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -69,7 +69,9 @@ makeScopeWithSplicing' { }; in (lib.makeOverridable mkMaui attrs); - noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideScope'" "overrideDerivation" ]; + noExtraAttrs = set: + lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideScope'" "overrideDerivation" ] + // { __attrsFailEvaluation = true; }; in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdParty // kdeGear // mauiPackages // qt5 // { diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix index 33080d5620f07..95b28d073aa33 100644 --- a/pkgs/top-level/release-python.nix +++ b/pkgs/top-level/release-python.nix @@ -20,7 +20,7 @@ let let res = builtins.tryEval ( if isDerivation value then value.meta.isBuildPythonPackage or [] - else if value.recurseForDerivations or false || value.recurseForRelease or false then + else if value.recurseForDerivations or false || value.recurseForRelease or false || value.__recurseIntoDerivationForReleaseJobs or false then packagePython value else []); From 5d3d0f2c4b772fa5ed11262a63676644909ac110 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 18:55:56 -0800 Subject: [PATCH 011/123] AAAAAASomeThingsFailToEvaluate: provide a message which is actually helpful --- pkgs/top-level/all-packages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6cd2daa5ef71c..60c6b6d5a250d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -104,10 +104,10 @@ with pkgs; ### Evaluating the entire Nixpkgs naively will fail, make failure fast AAAAAASomeThingsFailToEvaluate = throw '' - Please be informed that this pseudo-package is not the only part of - Nixpkgs that fails to evaluate. You should not evaluate entire Nixpkgs - without some special measures to handle failing packages, like those taken - by Hydra. + Please be informed that this pseudo-package is not the only part + of Nixpkgs that fails to evaluate. You should not evaluate + entire Nixpkgs without some special measures to handle failing + packages, like using pkgs/top-level/release-attrpaths.nix. ''; tests = callPackages ../test { }; From a80e7cd3d7c704484d5a350bb4288e268a1760ef Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 17:52:27 -0800 Subject: [PATCH 012/123] pkgs/top-level/release-attrpaths-superset.nix: init This file walks the entire nixpkgs tree and emits a superset of all release attrnames in only 44 seconds on a 3ghz CPU, using 5 gbytes of memory. By comparison, on the same CPU the `nix-env` hack used by ofborg on every PR submission requires 41 *minutes* and peaks at 60 gbytes, even with checkMeta turned off. Full details below. This is: - 46x faster (or 2.1% of the elapsed time) - 12.5x less memory (or 8.0% of the peak memory usage) In order to replace the ofborg check, this list of attrnames must then be post-filtered for platform-relevance. However, crucially, the post-filtering can be done *in parallel* on multiple cores by splitting the attrname list in to chunks. Generating the list of attrnames cannot be parallelized because it is a single-threaded cppnix task. This PR also adds `recurseForDerivations` where necessary within nixpkgs in order to make this possible -- it screens out various non-tryEval-catchable failures and infinite recursions. Before undraftifying, I will add an invocation of this command to the CI tests, to ensure that the work performed here is not immediately undone. My next PR will then add an additional CI check confirming that the emitted attrpaths are in fact a superset of the release attrpaths calculated by the slow-memory-hog ofborg method. I have manually confirmed that this is the case at the tip commit of this PR, but we need CI to make sure this remains true until ofborg switches to this more-efficient method of calculation; at that point the superset-check can be dropped. According to GNU Time, Command being timed: "nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names" User time (seconds): 44.88 System time (seconds): 8.09 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:53.20 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 4823028 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 3611240 Voluntary context switches: 113 Involuntary context switches: 949 Swaps: 0 File system inputs: 1480 File system outputs: 5944 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 Compared to release-outpaths.nix: Command being timed: "nix-env -qaP --no-name --out-path --arg checkMeta false --argstr path /git/work/pr/release-outpaths -f pkgs/top-level/release-outpaths.nix" User time (seconds): 2120.67 System time (seconds): 337.80 Percent of CPU this job got: 98% Elapsed (wall clock) time (h:mm:ss or m:ss): 41:37.91 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 60171768 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 2 Minor (reclaiming a frame) page faults: 230608113 Voluntary context switches: 8876 Involuntary context switches: 22275 Swaps: 0 File system inputs: 62624 File system outputs: 72 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 --- pkgs/top-level/release-attrpaths-superset.nix | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 pkgs/top-level/release-attrpaths-superset.nix diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix new file mode 100644 index 0000000000000..888fa738c264d --- /dev/null +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -0,0 +1,179 @@ +# This expression will, as efficiently as possible, dump a +# *superset* of all attrpaths of derivations which might be +# part of a release on *any* platform. +# +# Both this expression and what ofborg uses (release-outpaths.nix) +# are essentially single-threaded (under the current cppnix +# implementation). +# +# This expression runs much, much, much faster and uses much, much +# less memory than the ofborg script by skipping the +# platform-relevance checks. The ofborg outpaths.nix script takes +# half an hour on a 3ghz core and peaks at 60gbytes of memory; this +# expression runs on the same machine in 44 seconds with peak memory +# usage of 5gbytes. +# +# Once you have the list of attrnames you can split it up into +# $NUM_CORES batches and run the platform checks separately for each +# batch, in parallel. +# +# To dump the attrnames: +# +# nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names +# +{ lib ? import (path + "/lib") +, trace ? false +, path ? ./../.. +}: +let + + # No release package attrpath may have any of these attrnames as + # its initial component. + # + # If you can find a way to remove any of these entries without + # causing CI to fail, please do so. + # + excluded-toplevel-attrs = { + # spliced packagesets + __splicedPackages = true; + pkgsBuildBuild = true; + pkgsBuildHost = true; + pkgsBuildTarget = true; + pkgsHostHost = true; + pkgsHostTarget = true; + pkgsTargetTarget = true; + buildPackages = true; + targetPackages = true; + + # cross packagesets + pkgsLLVM = true; + pkgsMusl = true; + pkgsStatic = true; + pkgsCross = true; + pkgsi686Linux = true; + }; + + # No release package attrname may have any of these at a component + # anywhere in its attrpath. These are the names of gigantic + # top-level attrsets that have leaked into so many sub-packagesets + # that it's easier to simply exclude them entirely. + # + # If you can find a way to remove any of these entries without + # causing CI to fail, please do so. + # + excluded-attrnames-at-any-depth = { + lib = true; + override = true; + __functor = true; + __functionArgs = true; + newScope = true; + scope = true; + pkgs = true; + + buildHaskellPackages = true; + buildPackages = true; + generateOptparseApplicativeCompletions = true; + + callPackage = true; + mkDerivation = true; + overrideDerivation = true; + overrideScope = true; + overrideScope' = true; + + # Special case: lib/types.nix leaks into a lot of nixos-related + # derivations, and does not eval deeply. + type = true; + }; + + # __attrsFailEvaluation is a temporary workaround to get top-level + # eval to succeed (under builtins.tryEval) for the entire + # packageset, without deep invasve changes into individual + # packages. + # + # Now that CI has been added, ensuring that top-level eval will + # not be broken by any new commits, you should not add any new + # occurrences of __attrsFailEvaluation, and should remove them + # wherever you are able to (doing so will likely require deep + # adjustments within packages). Once all of the uses of + # __attrsFailEvaluation are removed, it will be deleted from the + # routine below. In the meantime, + # + # The intended semantics are that an attrpath rooted at pkgs is + # part of the (unfiltered) release jobset iff all of the following + # are true: + # + # 1. The first component of the attrpath is not in + # `excluded-toplevel-attrs` + # + # 2. No attrname in the attrpath belongs to the list of forbidden + # attrnames `excluded-attrnames-at-any-depth` + # + # 3. The attrpath leads to a value for which lib.isDerivation is true + # + # 4. No proper prefix of the attrpath has __attrsFailEvaluation=true + # + # 5. Any proper prefix of the attrpath at which lib.isDerivation + # is true also has __recurseIntoDerivationForReleaseJobs=true. + # + # The last condition is unfortunately necessary because there are + # Hydra release jobnames which have proper prefixes which are + # attrnames of derivations (!). We should probably restructure + # the job tree so that this is not the case. + # + justAttrNames = path: value: + let + attempt = + if lib.isDerivation value && + # in some places we have *derivations* with jobsets as subattributes, ugh + !(value.__recurseIntoDerivationForReleaseJobs or false) then + [ path ] + else if !(lib.isAttrs value) then [] + else if (value.__attrsFailEvaluation or false) then [] + else lib.pipe value [ + (builtins.mapAttrs + (name: value: + if excluded-attrnames-at-any-depth.${name} or false then [] else + (justAttrNames (path ++ [name]) value))) + builtins.attrValues + builtins.concatLists + ]; + + seq = builtins.deepSeq attempt attempt; + tried = builtins.tryEval seq; + + result = + if !tried.success + then lib.warn "tryEval failed at: ${lib.concatStringsSep "." path}" [] + else tried.value; + in + if !trace + then result + else lib.trace "** ${lib.concatStringsSep "." path}" result; + + unfiltered = import ./release-outpaths.nix { + checkMeta = false; + attrNamesOnly = true; + inherit path; + }; + + filtered = lib.pipe unfiltered [ + (pkgs: builtins.removeAttrs pkgs (builtins.attrNames excluded-toplevel-attrs)) + ]; + + paths = + [ + # I am not entirely sure why these three packages end up in + # the Hydra jobset. But they do, and they don't meet the + # criteria above, so at the moment they are special-cased. + [ "pkgsLLVM" "stdenv" ] + [ "pkgsStatic" "stdenv" ] + [ "pkgsMusl" "stdenv" ] + ] ++ justAttrNames [] filtered; + + names = + map (path: (lib.concatStringsSep "." path)) paths; + +in +{ + inherit paths names; +} From 0cd4fa241313ebf1127a0c5ed89cb0d214f2535e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 23 Nov 2023 05:00:26 -0800 Subject: [PATCH 013/123] pkgs/test/release/release-attrpaths-superset.nix: init This test checks that what release-attrpaths-superset.nix calculates is in fact a superset of the attributes which are calculated by the much-slower ofborg method. To run the test, invoke this command: nix-build pkgs/test/release/release-attrpaths-superset.nix -A failures The result should be the empty list []. --- .../release/release-attrpaths-superset.nix | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pkgs/test/release/release-attrpaths-superset.nix diff --git a/pkgs/test/release/release-attrpaths-superset.nix b/pkgs/test/release/release-attrpaths-superset.nix new file mode 100644 index 0000000000000..58a8f961d9b55 --- /dev/null +++ b/pkgs/test/release/release-attrpaths-superset.nix @@ -0,0 +1,59 @@ +{ lib ? import ../../../lib +, pkgs ? import ../../.. { } +}: +let + + nixpkgs-source = lib.cleanSource ../../..; + + attrpaths-calculated-the-ofborg-way-drv = + pkgs.runCommand "attrpaths-calculated-the-ofborg-way.txt" {} '' + cp -r ${nixpkgs-source} nixpkgs + mkdir fake-store + ${pkgs.nix}/bin/nix-env --store ./fake-store \ + -qaP \ + --no-name \ + --arg checkMeta false \ + --argstr path $(pwd)/nixpkgs \ + -f nixpkgs/pkgs/top-level/release-outpaths.nix \ + | sed 's/\.[^.]*$//' \ + | sort \ + | uniq \ + > $out + ''; + + # yes, IFD + attrpaths-calculated-the-ofborg-way = + lib.splitString "\n" + (builtins.readFile + (import attrpaths-calculated-the-ofborg-way-drv) + ); + + attrpaths-calculated-the-fast-way = + (import ../../../pkgs/top-level/release-attrpaths-superset.nix { }) + .names; + + attrset-with-every-ofborg-way-attr-set-to-true = + builtins.listToAttrs + (map (path: lib.nameValuePair path true) + attrpaths-calculated-the-ofborg-way); + + attrset-with-every-fast-way-attr-set-to-false = + builtins.listToAttrs + (map (path: lib.nameValuePair path false) + attrpaths-calculated-the-fast-way); + + attrset-should-have-no-true-attrvalues = + attrset-with-every-ofborg-way-attr-set-to-true + // attrset-with-every-fast-way-attr-set-to-false; + + failures = + lib.filter + (v: v != null) + (lib.mapAttrsToList + (k: v: if v == true then k else null) + attrset-should-have-no-true-attrvalues); + +in { + # should be [] + inherit failures; +} From cac084fea73491b6e0ea4eece1897e43192f39a5 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 23 Nov 2023 00:32:07 -0800 Subject: [PATCH 014/123] lib/tests/release.nix: run release-attrpaths-superset.nix This verifies that release-attrpaths-superset.nix does not encounter infinite recursion or non-tryEval-able failures. --- lib/tests/release.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tests/release.nix b/lib/tests/release.nix index 843180490bb2b..29fc6aa6a4e8d 100644 --- a/lib/tests/release.nix +++ b/lib/tests/release.nix @@ -60,6 +60,15 @@ let echo "Running lib/tests/systems.nix" [[ $(nix-instantiate --eval --strict lib/tests/systems.nix | tee /dev/stderr) == '[ ]' ]]; + cp -r ${../../pkgs} pkgs + cp -r ${../../default.nix} default.nix + cp -r ${../../nixos} nixos + cp -r ${../../maintainers} maintainers + cp -r ${../../.version} .version + cp -r ${../../doc} doc + echo "Running pkgs/top-level/release-attrpaths-superset.nix" + nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names > /dev/null + mkdir $out echo success > $out/${nix.version} ''; From ea10f688f6131d3e210b447a892d77dee84c193c Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 30 Nov 2023 18:29:10 -0800 Subject: [PATCH 015/123] pkgs/top-level/release-attrpaths-superset.nix: add enableWarnings?true parameter --- pkgs/top-level/release-attrpaths-superset.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix index 888fa738c264d..a3b58be0287e7 100644 --- a/pkgs/top-level/release-attrpaths-superset.nix +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -23,6 +23,7 @@ # { lib ? import (path + "/lib") , trace ? false +, enableWarnings ? true , path ? ./../.. }: let @@ -142,9 +143,11 @@ let tried = builtins.tryEval seq; result = - if !tried.success + if tried.success + then tried.value + else if enableWarnings then lib.warn "tryEval failed at: ${lib.concatStringsSep "." path}" [] - else tried.value; + else []; in if !trace then result From 98d54942318ff9f9c2f44dc1162b7096a5e54929 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 30 Nov 2023 18:32:21 -0800 Subject: [PATCH 016/123] pkgs/top-level/release-attrpaths-superset.nix: exempt AAAAAASomeThingsFailToEvaluate from warnings --- pkgs/top-level/release-attrpaths-superset.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix index a3b58be0287e7..de122a50353fd 100644 --- a/pkgs/top-level/release-attrpaths-superset.nix +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -145,7 +145,7 @@ let result = if tried.success then tried.value - else if enableWarnings + else if enableWarnings && path != [ "AAAAAASomeThingsFailToEvaluate" ] then lib.warn "tryEval failed at: ${lib.concatStringsSep "." path}" [] else []; in From f53bd3438f87fd3ac24543a19414cad7e3bf34ef Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 13:23:52 -0800 Subject: [PATCH 017/123] pkgs/top-level/release-attrpaths-superset.nix: pass through checkMeta --- pkgs/top-level/release-attrpaths-superset.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix index de122a50353fd..2a365aff3f058 100644 --- a/pkgs/top-level/release-attrpaths-superset.nix +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -24,6 +24,7 @@ { lib ? import (path + "/lib") , trace ? false , enableWarnings ? true +, checkMeta ? true , path ? ./../.. }: let @@ -154,7 +155,7 @@ let else lib.trace "** ${lib.concatStringsSep "." path}" result; unfiltered = import ./release-outpaths.nix { - checkMeta = false; + inherit checkMeta; attrNamesOnly = true; inherit path; }; From 4089d9fe0b1529cf72869ce6422a833fb1699d9d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 13:25:20 -0800 Subject: [PATCH 018/123] pkgs/top-level/release-outpaths.nix: dont short-circuit handleEvalIssue when attrNamesOnly --- pkgs/top-level/release-outpaths.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 3a9cf15247a28..854fb8a361dc9 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -41,7 +41,6 @@ let checkMeta = checkMeta; handleEvalIssue = reason: errormsg: - if attrNamesOnly then true else let fatalErrors = [ "unknown-meta" From 89b93a966229bd23fa8a7ed3ea449a254c84f321 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 13:25:41 -0800 Subject: [PATCH 019/123] pkgs/top-level/release-outpaths.nix: never attempt to build unfree packages, most of them are broken Since Hydra does not build unfree packages an astonishing proportion of them are broken yet not marked meta.broken. --- pkgs/top-level/release-outpaths.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 854fb8a361dc9..6b789116474f7 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -36,7 +36,7 @@ let config = { allowAliases = false; allowBroken = includeBroken; - allowUnfree = true; + allowUnfree = false; allowInsecurePredicate = x: true; checkMeta = checkMeta; @@ -49,7 +49,8 @@ let in if builtins.elem reason fatalErrors then abort errormsg - else if !includeBroken && builtins.elem reason [ "broken" ] + # hydra does not build unfree packages, so tons of them are broken yet not marked meta.broken. + else if !includeBroken && builtins.elem reason [ "broken" "unfree" ] then throw "broken" else true; From 644e58990e2bcf507fa6892b79150507ad84bf97 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 13:26:49 -0800 Subject: [PATCH 020/123] pkgs/top-level/release-attrpaths-superset.nix: add another weird edge case Ugh, not only do we have jobsets-within-derivations, we have situations where a meta.broken==true derivation contains meta.broken==false jobsets which are in fact broken but nobody noticed because they are meta.license==unfree. Adding an edge case for now; we should mark these packages broken and remove the edge case. One example is promscale_extension. --- pkgs/top-level/release-attrpaths-superset.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix index 2a365aff3f058..673b63a5ac34f 100644 --- a/pkgs/top-level/release-attrpaths-superset.nix +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -129,6 +129,15 @@ let # in some places we have *derivations* with jobsets as subattributes, ugh !(value.__recurseIntoDerivationForReleaseJobs or false) then [ path ] + + # Even wackier case: we have meta.broken==true jobs with + # !meta.broken jobs as subattributes with license=unfree, and + # check-meta.nix won't throw an "unfree" failure because the + # enclosing derivation is marked broken. Yeah. Bonkers. + # We should just forbid jobsets enclosed by derivations. + else if lib.isDerivation value && + !value.meta.available then [] + else if !(lib.isAttrs value) then [] else if (value.__attrsFailEvaluation or false) then [] else lib.pipe value [ From 843819d811bb28e7d1625d2c67fdd931b36d7705 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 23:33:13 -0800 Subject: [PATCH 021/123] pkgs/top-level/release-outpaths-parallel.{nix,sh}: init 5x faster eval checks On a 32-core machine, the following command takes 4m58s: NIX_BUILD_CORES=32 time pkgs/top-level/release-outpaths-parallel.sh false Produces exactly the same output as this command, which takes 24m10s: time nix-env -qaP --no-name --out-path --arg checkMeta false -f pkgs/top-level/release-outpaths.nix | sort ... in 1/5th of the wall-clock time. So the eval-check latency is reduced by 5x. Includes - https://github.com/NixOS/nixpkgs/pull/269356 pkgs/top-level/release-outpaths-parallel.nix: pass includeBroken --- pkgs/top-level/release-outpaths-parallel.nix | 56 ++++++++++++++++++++ pkgs/top-level/release-outpaths-parallel.sh | 13 +++++ 2 files changed, 69 insertions(+) create mode 100644 pkgs/top-level/release-outpaths-parallel.nix create mode 100755 pkgs/top-level/release-outpaths-parallel.sh diff --git a/pkgs/top-level/release-outpaths-parallel.nix b/pkgs/top-level/release-outpaths-parallel.nix new file mode 100644 index 0000000000000..db3aba6b549e4 --- /dev/null +++ b/pkgs/top-level/release-outpaths-parallel.nix @@ -0,0 +1,56 @@ +/* +Invocation: + + +Invocation; note that the number of processes spawned is four times +the number of cores -- this helps in two ways: + +1. Keeping cores busy while I/O operations are in flight + +2. Since the amount of time needed for the jobs is *not* balanced + this minimizes the "tail latency" for the very last job to finish + (on one core) by making the job size smaller. + +*/ +# see release-outpaths-parallel.sh +{ lib ? import ../../lib +, checkMeta +, includeBroken ? true +, path ? ./../.. +, myChunk +, numChunks + +# This file should contain the result of: +# nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names +, attrPathFile ? ../../release-attrpaths-superset.out +}: + +let + attrPaths = builtins.fromJSON (builtins.readFile attrPathFile); + chunkSize = (lib.length attrPaths) / numChunks; + myPaths = + let + dropped = lib.drop (chunkSize*myChunk) attrPaths; + in + if myChunk == numChunks - 1 + then dropped + else lib.take chunkSize dropped; + + unfiltered = import ./release-outpaths.nix { + inherit checkMeta path includeBroken; + }; + + filtered = lib.pipe myPaths [ + (map (lib.splitString ".")) + (map (path: lib.setAttrByPath path (lib.attrByPath path null unfiltered))) + (builtins.foldl' lib.recursiveUpdate {}) + ]; + + recurseEverywhere = val: + if lib.isDerivation val || !(lib.isAttrs val) + then val + else (builtins.mapAttrs (_: v: recurseEverywhere v) val) + // { recurseForDerivations = true; }; + +in + recurseEverywhere filtered diff --git a/pkgs/top-level/release-outpaths-parallel.sh b/pkgs/top-level/release-outpaths-parallel.sh new file mode 100755 index 0000000000000..16dff0e1439e8 --- /dev/null +++ b/pkgs/top-level/release-outpaths-parallel.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -x +CHECK_META=$1 + +nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names > release-attrpaths-superset.out + +NUM_CHUNKS=$((4*$NIX_BUILD_CORES)) + +parallel -j $NIX_BUILD_CORES \ + nix-env -qaP --no-name --out-path -f pkgs/top-level/release-outpaths-parallel.nix --arg checkMeta "$1" --arg numChunks $NUM_CHUNKS --arg myChunk \ + -- $(seq 0 $(($NUM_CHUNKS-1))) \ +| sort From 3d62ecd79cffb1d2774df804d394580470806791 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 13:26:19 -0800 Subject: [PATCH 022/123] pkgs/top-level/release-outpaths-parallel.nix: remove default for attrPathFile argument --- pkgs/top-level/release-outpaths-parallel.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/top-level/release-outpaths-parallel.nix b/pkgs/top-level/release-outpaths-parallel.nix index db3aba6b549e4..8c624cb864b1a 100644 --- a/pkgs/top-level/release-outpaths-parallel.nix +++ b/pkgs/top-level/release-outpaths-parallel.nix @@ -19,10 +19,7 @@ the number of cores -- this helps in two ways: , path ? ./../.. , myChunk , numChunks - -# This file should contain the result of: -# nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names -, attrPathFile ? ../../release-attrpaths-superset.out +, attrPathFile }: let From 283848fec22674a9201df6f4d66f4c8714a3dbbf Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 26 Nov 2023 17:53:23 -0800 Subject: [PATCH 023/123] pkgs/top-level/nohydra: init --- pkgs/top-level/nohydra/build-everything.nix | 0 pkgs/top-level/nohydra/default.nix | 258 ++++++++++++++++++++ pkgs/top-level/nohydra/instantiate.sh | 20 ++ 3 files changed, 278 insertions(+) create mode 100644 pkgs/top-level/nohydra/build-everything.nix create mode 100644 pkgs/top-level/nohydra/default.nix create mode 100755 pkgs/top-level/nohydra/instantiate.sh diff --git a/pkgs/top-level/nohydra/build-everything.nix b/pkgs/top-level/nohydra/build-everything.nix new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/pkgs/top-level/nohydra/default.nix b/pkgs/top-level/nohydra/default.nix new file mode 100644 index 0000000000000..40d06dd74dd4b --- /dev/null +++ b/pkgs/top-level/nohydra/default.nix @@ -0,0 +1,258 @@ +# +# Usage: +# +# nix-build pkgs/top-level/nohydra -A release-drvpaths +# pkgs/top-level/nohydra/instantiate.sh +# nix-build pkgs/top-level/nohydra -A release --keep-going +# +# Technically you can omit the first command and it will get +# re-executed as part of instantiate.sh, but I prefer to run it +# separately so that the second step (which is the only non +# nix-build step) always runs very quickly. nix-build gives good +# feedback on its progress. +# +# Why are there three steps? +# +# Short answer: in order to exploit `nix-instantiate` / `nix-build` +# separation, which is the trick to being able to do release builds +# without the Hydra software. +# +# Long answer: +# +# 1. Generating the list of release attrpaths requires a lot of +# memory; generating the list of release drvpaths requires an +# even larger amount of memory, and a *huge* amount of +# processing. The first command generates both of these +# (attrpaths and drvpaths). This is all done inside of a Nix +# derivation, which ensures that the list depends only on the git +# HEAD commit-hash, and also that this expensive work isn't done +# over again unless that commit has changed. +# +# 2. The second command iterates over the list of attrpaths/drvpaths +# and runs `nix-instantiate` on each attrpath whose drvpath +# doesn't exist in the local store. This cannot be done from +# inside a derivation (at least not without recursive-nix). +# +# 3. The third command builds all the derivations in one massive +# build. This is possible because it starts from a list of +# derivations -- the Nix evaluator (libexpr) does almost no work +# in the third command. +# + +{ lib ? pkgs.lib +, stdenv ? pkgs.stdenv +, pkgs ? import ../../../. { } +, nix ? pkgs.nix +, includeBroken ? false +, enableParallel ? true +, enableCheckMeta ? true +, nixpkgs-gitdir ? ../../../.git +}: + +let + + rev = lib.commitIdFromGitRepo nixpkgs-gitdir; + shortRev = builtins.substring 0 8 rev; + src = builtins.fetchGit { + name = "nixpkgs"; + shallow = true; + inherit rev; + ref = "HEAD"; + url = nixpkgs-gitdir; + }; + + # Copied from lib/tests/release.nix but changed to ensure that + # NIX_STORE_DIR is the same inside these derivations as it is + # outside -- otherwise the drvPaths will be different! + initialize-nix-store = '' + datadir="${nix}/share" + mkdir -p ${builtins.storeDir} + export TEST_ROOT=$(pwd)/test-tmp + export HOME=$(mktemp -d) + export NIX_BUILD_HOOK= + export NIX_CONF_DIR=$TEST_ROOT/etc + export NIX_LOCALSTATE_DIR=$TEST_ROOT/var + export NIX_LOG_DIR=$TEST_ROOT/var/log/nix + export NIX_STATE_DIR=$TEST_ROOT/var/nix + export NIX_STORE_DIR=${builtins.storeDir} + export PAGER=cat + cacheDir=$TEST_ROOT/binary-cache + nix-store --init + ''; + + # This runs serially, on one core. It is used only if enableParallel=true. + release-attrpaths-superset = stdenv.mkDerivation { + pname = "nixpkgs-release-attrpaths-superset"; + version = shortRev; + inherit src; + nativeBuildInputs = [ pkgs.nix ]; + buildPhase = '' + ${initialize-nix-store} + runHook preBuild + ${lib.escapeShellArgs [ + "nix-instantiate" + "--eval" + "--strict" + "--json" + "--readonly-mode" + "pkgs/top-level/release-attrpaths-superset.nix" + "-A" "names" + ]} > release-attrpaths-superset.out; + runHook postBuild + ''; + installPhase = '' + mkdir $out + mv release-attrpaths-superset.out $out/release-attrpaths-superset.json + ''; + }; + + attrpaths-json = "${release-attrpaths-superset}/release-attrpaths-superset.json"; + + buildCommand = [ + "${pkgs.time}/bin/time" "-v" + ] ++ lib.optionals enableParallel [ + "${pkgs.moreutils}/bin/parallel" "-j" "$NIX_BUILD_CORES" + ] ++ [ + "${nix}/bin/nix-env" + "-qaP" + "--no-name" + "--drv-path" + # we can't use "--json" here because it will cause Nix to ignore "--drv-path" + # TODO: open an issue in github.com/nixos/nix and link it here + # also, ${moreutils}/bin/parallel ensures interleaving at \n but json has multiline output. + "--arg" "checkMeta" (lib.boolToString enableCheckMeta) + "--arg" "includeBroken" (lib.boolToString includeBroken) + "-f" "pkgs/top-level/release-outpaths${lib.optionalString enableParallel "-parallel"}.nix" + ] ++ lib.optionals enableParallel [ + "--arg" "attrPathFile" attrpaths-json + "--arg" "numChunks" "$NUM_CHUNKS" + "--arg" "myChunk" + "--" "$(seq 0 $(($NUM_CHUNKS-1)))" + ]; + + release-drvpaths = stdenv.mkDerivation { + pname = "nixpkgs-release"; + version = rev; + inherit src; + + nativeBuildInputs = [ nix ]; + + preBuild = lib.optionalString enableParallel '' + NUM_CHUNKS=$((4*$NIX_BUILD_CORES)) + ${pkgs.jq}/bin/jq -r '.[]' < ${attrpaths-json} > attrpaths + echo generating $(wc -l < attrpaths) attrpaths in chunks of $NUM_CHUNKS on $NIX_BUILD_CORES cores + ''; + + buildPhase = '' + runHook preBuild + ${initialize-nix-store} + ${toString buildCommand} > release-drvpaths.txt + runHook postBuild + ''; + + installPhase = '' + mkdir -p $out + mv release-drvpaths.txt $out + ''; + }; + + # uses IFD + release-map-system-attrpath-drvpath = let + drvpath-lines = builtins.readFile "${release-drvpaths}/release-drvpaths.txt"; # IFD + lines = builtins.filter (x: x != [] && x != "") (builtins.split "\n" drvpath-lines); + line-to-attr = line: + let + matches = builtins.split "( *)" line; + attrpath-with-system = lib.head matches; # everything before the matched regex + drvpath = lib.lists.last matches; # everything after the matched regex + attrpath-split = lib.splitString "." attrpath-with-system; + system = lib.last attrpath-split; + attrpath = lib.concatStringsSep "." (lib.take ((lib.length attrpath-split)-1) attrpath-split); + in { + "${system}" = { + "${attrpath}" = drvpath; + }; + }; + in + lib.pipe lines [ + (map line-to-attr) + lib.zipAttrs + (builtins.mapAttrs (_: lib.attrsets.mergeAttrsList)) + ]; + + release-map-attrpath-drvpath = + release-map-system-attrpath-drvpath.${builtins.currentSystem}; + + # uses IFD and is hideously impure + uninstantiated = + builtins.listToAttrs + (lib.filter (x: x!=null) + (lib.mapAttrsToList + (attrpath: drvpath: + if builtins.pathExists drvpath + then null + else lib.nameValuePair attrpath drvpath) + release-map-attrpath-drvpath)); + + uninstantiated-attrpaths = lib.mapAttrsToList (attrpath: drvpath: attrpath) uninstantiated; + uninstantiated-drvpaths = lib.mapAttrsToList (attrpath: drvpath: drvpath) uninstantiated; + unrealised-drvpaths = lib.pipe release-map-attrpath-drvpath [ + builtins.attrValues + (map (drvpath: + let + imported = import drvpath; + outpaths = map (output: output.outPath) imported.all; + any-outpath-unrealised = + lib.any (outPath: + # we need to test if the outpath exists without + # triggering it being built (yet) + let + path = builtins.unsafeDiscardStringContext outPath; + exists = builtins.pathExists path; + in + if !exists + then + #lib.trace "${path}" + true + else false + ) + outpaths; + in + if any-outpath-unrealised + then drvpath + else null)) + (lib.filter (x: x!=null)) + ]; + + release = + # thanks to @DavHau for this trick: + # https://github.com/nix-how/marsnix/pull/1 + map (drvFile: + let + drvFile-discarded = builtins.unsafeDiscardStringContext drvFile; + imported = import drvFile; + outputs = map + (output: builtins.unsafeDiscardStringContext (output.outputName or "out")) + imported.all; + in { + name = ""; + type = "derivation"; + drvPath = builtins.appendContext "${drvFile-discarded}" { + "${drvFile-discarded}" = { + inherit outputs; + }; + }; + }) + unrealised-drvpaths; + +in +{ + inherit + release-attrpaths-superset + release-drvpaths + release-map-system-attrpath-drvpath + release-map-attrpath-drvpath + uninstantiated-attrpaths + unrealised-drvpaths + release; +} diff --git a/pkgs/top-level/nohydra/instantiate.sh b/pkgs/top-level/nohydra/instantiate.sh new file mode 100755 index 0000000000000..3091a7260e3d4 --- /dev/null +++ b/pkgs/top-level/nohydra/instantiate.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# +# Run this from the top-level nixpkgs directory. +# + +TMPFILE=$(mktemp) +nix-instantiate --impure --json --strict --eval pkgs/top-level/nohydra -A uninstantiated-attrpaths | jq -r '.[]' > $TMPFILE + +export NIXPKGS_ALLOW_UNFREE=1 +export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 +export NIXPKGS_ALLOW_INSECURE=1 + +if [[ -s $TMPFILE ]]; then + echo you have $(wc -l < $TMPFILE) uninstantiated attrpaths, instantiating them... + cat $TMPFILE | sed 's/^/-A\n/' | xargs -n256 -P16 nix-instantiate . +else + echo you have no uninstantiated attrpaths! +fi + From 53e4504fd91c256f2e2ed533ed1d5b2680b12219 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 13:28:56 -0800 Subject: [PATCH 024/123] pkgs/top-level/nohydra/instantiate.sh: dont attempt to build unfree software, most of it is broken --- pkgs/top-level/nohydra/instantiate.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/nohydra/instantiate.sh b/pkgs/top-level/nohydra/instantiate.sh index 3091a7260e3d4..437a461aaeb8a 100755 --- a/pkgs/top-level/nohydra/instantiate.sh +++ b/pkgs/top-level/nohydra/instantiate.sh @@ -7,7 +7,6 @@ TMPFILE=$(mktemp) nix-instantiate --impure --json --strict --eval pkgs/top-level/nohydra -A uninstantiated-attrpaths | jq -r '.[]' > $TMPFILE -export NIXPKGS_ALLOW_UNFREE=1 export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 export NIXPKGS_ALLOW_INSECURE=1 From 6827c2e7fc618e2771886ea559ee20fb44bc60ee Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 14:46:45 -0800 Subject: [PATCH 025/123] pkgs/top-level/release-outpaths-parallel.nix: cleanup --- pkgs/top-level/release-outpaths-parallel.nix | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pkgs/top-level/release-outpaths-parallel.nix b/pkgs/top-level/release-outpaths-parallel.nix index 8c624cb864b1a..972dbf5f04968 100644 --- a/pkgs/top-level/release-outpaths-parallel.nix +++ b/pkgs/top-level/release-outpaths-parallel.nix @@ -37,17 +37,10 @@ let inherit checkMeta path includeBroken; }; - filtered = lib.pipe myPaths [ +in + lib.pipe myPaths [ (map (lib.splitString ".")) (map (path: lib.setAttrByPath path (lib.attrByPath path null unfiltered))) (builtins.foldl' lib.recursiveUpdate {}) - ]; - - recurseEverywhere = val: - if lib.isDerivation val || !(lib.isAttrs val) - then val - else (builtins.mapAttrs (_: v: recurseEverywhere v) val) - // { recurseForDerivations = true; }; + ] -in - recurseEverywhere filtered From 61fe667beac99e88696f71a7b9a6b4ceb5825139 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 14:47:06 -0800 Subject: [PATCH 026/123] pkgs/top-level/nohydra/default.nix: expose uninstantiated-drvpaths --- pkgs/top-level/nohydra/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/nohydra/default.nix b/pkgs/top-level/nohydra/default.nix index 40d06dd74dd4b..d86f48f5be015 100644 --- a/pkgs/top-level/nohydra/default.nix +++ b/pkgs/top-level/nohydra/default.nix @@ -253,6 +253,7 @@ in release-map-system-attrpath-drvpath release-map-attrpath-drvpath uninstantiated-attrpaths + uninstantiated-drvpaths unrealised-drvpaths release; } From 95880919b294262e0d82958a1f3901ebc2d04713 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 17:57:48 -0800 Subject: [PATCH 027/123] nohydra: build for buldPlatform only for now --- pkgs/top-level/nohydra/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/nohydra/default.nix b/pkgs/top-level/nohydra/default.nix index d86f48f5be015..9bd92a432340c 100644 --- a/pkgs/top-level/nohydra/default.nix +++ b/pkgs/top-level/nohydra/default.nix @@ -121,6 +121,7 @@ let # TODO: open an issue in github.com/nixos/nix and link it here # also, ${moreutils}/bin/parallel ensures interleaving at \n but json has multiline output. "--arg" "checkMeta" (lib.boolToString enableCheckMeta) + "--arg" "systems" "null" "--arg" "includeBroken" (lib.boolToString includeBroken) "-f" "pkgs/top-level/release-outpaths${lib.optionalString enableParallel "-parallel"}.nix" ] ++ lib.optionals enableParallel [ From 4a911b319c922b6c494f1186fb52f87a45519e54 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 17:59:48 -0800 Subject: [PATCH 028/123] dont build for unsupported platforms --- pkgs/top-level/release-outpaths.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/release-outpaths.nix b/pkgs/top-level/release-outpaths.nix index 6b789116474f7..a07751446b31f 100644 --- a/pkgs/top-level/release-outpaths.nix +++ b/pkgs/top-level/release-outpaths.nix @@ -52,6 +52,8 @@ let # hydra does not build unfree packages, so tons of them are broken yet not marked meta.broken. else if !includeBroken && builtins.elem reason [ "broken" "unfree" ] then throw "broken" + else if builtins.elem reason [ "unsupported" ] + then throw "unsupported" else true; inHydra = true; From 2d589ebc22b032f3ce8d73fb531d29aa2b428fc1 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 14:29:02 -0800 Subject: [PATCH 029/123] lib.customisation.callPackageWith: use throw, not abort --- lib/customisation.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/customisation.nix b/lib/customisation.nix index 08fc5db0614de..e8cc453a24bc0 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -189,7 +189,9 @@ rec { # Only show the error for the first missing argument error = errorForArg (lib.head missingArgs); - in if missingArgs == [] then makeOverridable f allArgs else abort error; + in if missingArgs == [] + then makeOverridable f allArgs + else throw "lib.customisation.callPackageWith: ${error}"; /* Like callPackage, but for a function that returns an attribute From 52a92db54fb41326498e4baa89a3bcd4506aa568 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:36 -0800 Subject: [PATCH 030/123] test.cuda: fix broken eval --- pkgs/test/cuda/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test/cuda/default.nix b/pkgs/test/cuda/default.nix index f2d2c6c55cb83..0c2860f38ce30 100644 --- a/pkgs/test/cuda/default.nix +++ b/pkgs/test/cuda/default.nix @@ -1,7 +1,7 @@ { callPackage }: rec { - cuda-samplesPackages = callPackage ./cuda-samples { }; + cuda-samplesPackages = callPackage ./cuda-samples/generic.nix { }; inherit (cuda-samplesPackages) cuda-samples_cudatoolkit_10 cuda-samples_cudatoolkit_10_0 @@ -14,7 +14,7 @@ rec { cuda-samples_cudatoolkit_11_3 cuda-samples_cudatoolkit_11_4; - cuda-library-samplesPackages = callPackage ./cuda-library-samples { }; + cuda-library-samplesPackages = callPackage ./cuda-library-samples/generic.nix { }; inherit (cuda-library-samplesPackages) cuda-library-samples_cudatoolkit_10 cuda-library-samples_cudatoolkit_10_1 From ba232232bc9bc7f5a8e4b846fb36175191e96d2d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:46 -0800 Subject: [PATCH 031/123] darwin.iosSdkPkgs: fix broken eval --- pkgs/os-specific/darwin/xcode/sdk-pkgs.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix index 50eb50ea6b787..45cb12b89f4cd 100644 --- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix +++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix @@ -22,8 +22,8 @@ rec { type = "derivation"; outPath = xcode + "/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${version}.sdk"; - platform = stdenv.targetPlatform.xcodePlatform; - version = stdenv.targetPlatform.sdkVer; + platform = stdenv.targetPlatform.xcodePlatform or ""; + version = stdenv.targetPlatform.sdkVer or ""; }; binutils = wrapBintoolsWith { From e5c37d4bdb12090c62ff2a13341a8458b48503b4 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:47:36 -0800 Subject: [PATCH 032/123] cudaPackages_10.cudaFlags: fix broken eval --- pkgs/development/compilers/cudatoolkit/flags.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/cudatoolkit/flags.nix b/pkgs/development/compilers/cudatoolkit/flags.nix index 3b88ebc708b45..be1d98e87122f 100644 --- a/pkgs/development/compilers/cudatoolkit/flags.nix +++ b/pkgs/development/compilers/cudatoolkit/flags.nix @@ -108,7 +108,7 @@ let # archNames :: List String # E.g. [ "Turing" "Ampere" ] - archNames = lists.unique (builtins.map (cap: cudaComputeCapabilityToName.${cap}) cudaCapabilities); + archNames = lists.unique (builtins.map (cap: cudaComputeCapabilityToName.${cap} or (throw "missing cuda compute capability")) cudaCapabilities); # realArches :: List String # The real architectures are physical architectures supported by the CUDA version. From 11f157a82e5cb9dfed83b1f18ee6243b874cb8a9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 29 Nov 2023 19:19:56 -0800 Subject: [PATCH 033/123] mkAdoptopenjdk: allow missing {jre,jdk}-openj9 attribute --- pkgs/top-level/java-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/java-packages.nix b/pkgs/top-level/java-packages.nix index 77a431d100a6d..7ac456817715c 100644 --- a/pkgs/top-level/java-packages.nix +++ b/pkgs/top-level/java-packages.nix @@ -39,7 +39,9 @@ in { jdk-hotspot = callPackage package.jdk-hotspot {}; jre-hotspot = callPackage package.jre-hotspot {}; + } // lib.optionalAttrs (package?jdk-openj9) { jdk-openj9 = callPackage package.jdk-openj9 {}; + } // lib.optionalAttrs (package?jre-openj9) { jre-openj9 = callPackage package.jre-openj9 {}; }; From 85879557875ac232613bfde8710618f515029aae Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:03 -0800 Subject: [PATCH 034/123] steam.runtime-wrapped: use throw, not abort --- pkgs/games/steam/runtime-wrapped.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix index 3b6cfcd6ee129..648e012d3fe58 100644 --- a/pkgs/games/steam/runtime-wrapped.nix +++ b/pkgs/games/steam/runtime-wrapped.nix @@ -21,7 +21,7 @@ let gnuArch = if steamArch == "amd64" then "x86_64-linux-gnu" else if steamArch == "i386" then "i386-linux-gnu" - else abort "Unsupported architecture"; + else throw "Unsupported architecture"; libs = [ "lib/${gnuArch}" "lib" "usr/lib/${gnuArch}" "usr/lib" ]; bins = [ "bin" "usr/bin" ]; From 14d9aac2eea0a8c1bf0e8cb8ea4bb9de36592a0d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:43:48 -0800 Subject: [PATCH 035/123] tests.nixops: fix broken eval --- nixos/tests/nixops/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix index b8f747b2a19f1..f7a26f2461c4c 100644 --- a/nixos/tests/nixops/default.nix +++ b/nixos/tests/nixops/default.nix @@ -1,4 +1,6 @@ -{ pkgs, ... }: +{ pkgs +, testers +, ... }: let inherit (pkgs) lib; @@ -19,7 +21,7 @@ let passthru.override = args': testsForPackage (args // args'); }; - testLegacyNetwork = { nixopsPkg, ... }: pkgs.nixosTest ({ + testLegacyNetwork = { nixopsPkg, ... }: testers.nixosTest ({ name = "nixops-legacy-network"; nodes = { deployer = { config, lib, nodes, pkgs, ... }: { From c6b5da7d21c159c63301c16ba2d4ae96911a3d84 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:44:56 -0800 Subject: [PATCH 036/123] dockapps.wmsm-app: fix broken eval --- pkgs/by-name/wi/windowmaker/dockapps/wmsm-app.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/wi/windowmaker/dockapps/wmsm-app.nix b/pkgs/by-name/wi/windowmaker/dockapps/wmsm-app.nix index 6becfce9578bc..36b555a81dd4f 100644 --- a/pkgs/by-name/wi/windowmaker/dockapps/wmsm-app.nix +++ b/pkgs/by-name/wi/windowmaker/dockapps/wmsm-app.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (dockapps-sources) version src; - sourceRoot = "${src.name}/wmsm.app/wmsm"; + sourceRoot = "${finalAttrs.src.name}/wmsm.app/wmsm"; buildInputs = [ libX11 From 57d0de8b1c729be7dcef3a648fa69adc4fec4279 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:45:18 -0800 Subject: [PATCH 037/123] dockapps.wmsystemtray: fix broken eval --- pkgs/by-name/wi/windowmaker/dockapps/wmsystemtray.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/wi/windowmaker/dockapps/wmsystemtray.nix b/pkgs/by-name/wi/windowmaker/dockapps/wmsystemtray.nix index 7f17475d318fa..52ba4dacd0c23 100644 --- a/pkgs/by-name/wi/windowmaker/dockapps/wmsystemtray.nix +++ b/pkgs/by-name/wi/windowmaker/dockapps/wmsystemtray.nix @@ -33,8 +33,8 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "A system tray for Windowmaker"; homepage = "http://wmsystemtray.sourceforge.net"; - license = licenses.gpl2Only; + license = lib.licenses.gpl2Only; maintainers = [ ]; - platforms = platforms.linux; + platforms = lib.platforms.linux; }; }) From d13ee137396ddd0ffd34375a046d76a338b4b822 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Nov 2023 16:46:21 -0800 Subject: [PATCH 038/123] amdgpu-pro: make error message actionable --- pkgs/os-specific/linux/amdgpu-pro/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/amdgpu-pro/default.nix b/pkgs/os-specific/linux/amdgpu-pro/default.nix index 241145a24843c..96339c1d164f5 100644 --- a/pkgs/os-specific/linux/amdgpu-pro/default.nix +++ b/pkgs/os-specific/linux/amdgpu-pro/default.nix @@ -27,7 +27,7 @@ let "i386-linux-gnu" else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-gnu" - else throw "amdgpu-pro is Linux only. Sorry."; + else throw "amdgpu-pro is Linux only. Sorry ${stdenv.hostPlatform.system}."; in stdenv.mkDerivation rec { From 8eda2c75498e0461a7a6b53676eeb96d1bc6d868 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:06:41 -0800 Subject: [PATCH 039/123] disable-warnings-if-gcc13: init --- pkgs/top-level/all-packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60c6b6d5a250d..e9880e6609a0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15860,6 +15860,15 @@ with pkgs; gccFun = callPackage ../development/compilers/gcc; gcc-unwrapped = gcc.cc; + disable-warnings-if-gcc13 = pkg: + if (pkg.stdenv.cc.cc.isGNU or false && lib.versionAtLeast pkg.stdenv.cc.cc.version "13.0") + then pkg.overrideAttrs(previousAttrs: previousAttrs // { + env = previousAttrs.env or {} // { + NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + " -w"; + }; + }) + else pkg; + wrapNonDeterministicGcc = stdenv: ccWrapper: if ccWrapper.isGNU then ccWrapper.overrideAttrs(old: { env = old.env // { From 2cb3dead015dd49c1f9cd226087ab7ed64f9d251 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 17 Nov 2023 03:32:47 -0800 Subject: [PATCH 040/123] default-gcc-version: 12 -> 13 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e9880e6609a0b..3c843b7d19b17 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15855,7 +15855,9 @@ with pkgs; default-gcc-version = if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6 - else 12; + else if stdenv.buildPlatform.isDarwin then 12 # unable to test + else if stdenv.buildPlatform.isAarch64 then 12 # unable to test + else 13; gcc = pkgs.${"gcc${toString default-gcc-version}"}; gccFun = callPackage ../development/compilers/gcc; gcc-unwrapped = gcc.cc; From 1e4609542e33b6bca9e3e0dfd030f1f3db8da2ef Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:06:20 -0800 Subject: [PATCH 041/123] pycrypto: disable-warnings-if-gcc13 --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 861093d22a3aa..8ffa25e0375b4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9957,7 +9957,7 @@ self: super: with self; { pycron = callPackage ../development/python-modules/pycron { }; - pycrypto = callPackage ../development/python-modules/pycrypto { }; + pycrypto = pkgs.disable-warnings-if-gcc13 (callPackage ../development/python-modules/pycrypto { }); pycryptodome = callPackage ../development/python-modules/pycryptodome { }; From d00fbb4eded5b68b90f81ebafb674c660f2b18fb Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:06:29 -0800 Subject: [PATCH 042/123] efivar: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c843b7d19b17..11352816b7094 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7954,7 +7954,7 @@ with pkgs; efibootmgr = callPackage ../tools/system/efibootmgr { }; - efivar = callPackage ../tools/system/efivar { }; + efivar = disable-warnings-if-gcc13 (callPackage ../tools/system/efivar { }); eget = callPackage ../tools/misc/eget { }; From 405bd71498f731f6294e0fe6ba39724a03082328 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:06:55 -0800 Subject: [PATCH 043/123] libfilezilla: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11352816b7094..18a5182967845 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22766,9 +22766,10 @@ with pkgs; libfido2 = callPackage ../development/libraries/libfido2 {}; - libfilezilla = darwin.apple_sdk_11_0.callPackage ../development/libraries/libfilezilla { - inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices; - }; + libfilezilla = disable-warnings-if-gcc13 + (darwin.apple_sdk_11_0.callPackage ../development/libraries/libfilezilla { + inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices; + }); libfishsound = callPackage ../development/libraries/libfishsound { }; From ca4bd47c32c063b0ced30ae599c10545be6968a2 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:07:06 -0800 Subject: [PATCH 044/123] rocksdb: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18a5182967845..8474654de733a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24833,7 +24833,7 @@ with pkgs; rlottie = callPackage ../development/libraries/rlottie { }; - rocksdb = callPackage ../development/libraries/rocksdb { }; + rocksdb = disable-warnings-if-gcc13 (callPackage ../development/libraries/rocksdb { }); rocksdb_7_10 = rocksdb.overrideAttrs rec { pname = "rocksdb"; From 78b6fb1a6255fc57274753ef53a35f7296b71967 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:07:16 -0800 Subject: [PATCH 045/123] btop: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8474654de733a..d08d75d9ea234 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27959,9 +27959,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit; }; - btop = darwin.apple_sdk_11_0.callPackage ../tools/system/btop { - stdenv = gcc12Stdenv; - }; + btop = disable-warnings-if-gcc13 (darwin.apple_sdk_11_0.callPackage ../tools/system/btop { }); nmon = callPackage ../os-specific/linux/nmon { }; From 2b48fcf2a3c1d5b777e38664658f8341a36894ac Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:07:25 -0800 Subject: [PATCH 046/123] claws-mail: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d08d75d9ea234..6cbf81b694ee1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30929,7 +30929,7 @@ with pkgs; clapper = callPackage ../applications/video/clapper { }; - claws-mail = callPackage ../applications/networking/mailreaders/claws-mail { }; + claws-mail = disable-warnings-if-gcc13 (callPackage ../applications/networking/mailreaders/claws-mail { }); cligh = python3Packages.callPackage ../development/tools/github/cligh { }; From e67bef7a3b74b19de794e898cda1298ec9b0123e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:07:37 -0800 Subject: [PATCH 047/123] tesseract: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6cbf81b694ee1..5b732614ed2f8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35820,9 +35820,10 @@ with pkgs; tessen = callPackage ../tools/security/tessen { }; - inherit (callPackage ../applications/graphics/tesseract { - inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; - }) + inherit (lib.mapAttrs (_: disable-warnings-if-gcc13) + (callPackage ../applications/graphics/tesseract { + inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; + })) tesseract3 tesseract4 tesseract5; From 77a8cc4b2b949da9c88352503269d1c04c85a55d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 13:07:45 -0800 Subject: [PATCH 048/123] nixVersions: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b732614ed2f8..475d04145db2c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40636,11 +40636,12 @@ with pkgs; networkd-dispatcher = callPackage ../tools/networking/networkd-dispatcher { }; - nixVersions = recurseIntoAttrs (callPackage ../tools/package-management/nix { - storeDir = config.nix.storeDir or "/nix/store"; - stateDir = config.nix.stateDir or "/nix/var"; - inherit (darwin.apple_sdk.frameworks) Security; - }); + nixVersions = builtins.mapAttrs (_: disable-warnings-if-gcc13) + (recurseIntoAttrs (callPackage ../tools/package-management/nix { + storeDir = config.nix.storeDir or "/nix/store"; + stateDir = config.nix.stateDir or "/nix/var"; + inherit (darwin.apple_sdk.frameworks) Security; + })); nix = nixVersions.stable; From 83c7c29ef37d54e2ce185e18d0542e660d9450d0 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 18 Nov 2023 01:21:30 -0800 Subject: [PATCH 049/123] libgcc: pass --disable-plugins This is needed for gcc13 on many platforms due to errors like: ``` checking for library containing dlopen... (cached) none required checking for -fPIC -shared... yes configure: error: Building GCC with plugin support requires a host that supports -fPIC, -shared, -ldl and -rdynamic. ``` --- pkgs/development/libraries/gcc/libgcc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index c168113fa3c45..600ca69f46d04 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -10,6 +10,7 @@ let "--disable-intl" "--enable-threads=posix" "--with-glibc-version=${glibc.version}" + "--disable-plugin" # these are required in order to prevent inhibit_libc=true, # which will cripple libgcc's unwinder; see: From 725520646d59b42eae15700dd08cfc4fecbf5e49 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 23 Nov 2023 23:00:16 -0800 Subject: [PATCH 050/123] llvm: use gcc12Stdenv for llvmPackages<=14 libstdcxx does not build with gcc13 due to new warnings --- pkgs/top-level/all-packages.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 475d04145db2c..7f14d16f16f68 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7783,7 +7783,8 @@ with pkgs; rar2fs = callPackage ../tools/filesystems/rar2fs { }; rocmPackages = rocmPackages_5; - rocmPackages_5 = recurseIntoAttrs (callPackage ../development/rocm-modules/5 { }); + rocmPackages_5 = recurseIntoAttrs (callPackage ../development/rocm-modules/5 { + }); rune = callPackage ../development/interpreters/rune { }; @@ -16675,6 +16676,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_6.tools; targetLlvm = targetPackages.llvmPackages_6.llvm or llvmPackages_6.llvm; targetLlvmLibraries = targetPackages.llvmPackages_6.libraries or llvmPackages_6.libraries; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 }); llvmPackages_7 = recurseIntoAttrs (callPackage ../development/compilers/llvm/7 { @@ -16682,6 +16684,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_7.tools; targetLlvm = targetPackages.llvmPackages_7.llvm or llvmPackages_7.llvm; targetLlvmLibraries = targetPackages.llvmPackages_7.libraries or llvmPackages_7.libraries; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 }); llvmPackages_8 = recurseIntoAttrs (callPackage ../development/compilers/llvm/8 { @@ -16689,6 +16692,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_8.tools; targetLlvm = targetPackages.llvmPackages_8.llvm or llvmPackages_8.llvm; targetLlvmLibraries = targetPackages.llvmPackages_8.libraries or llvmPackages_8.libraries; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 }); llvmPackages_9 = recurseIntoAttrs (callPackage ../development/compilers/llvm/9 { @@ -16696,6 +16700,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_9.tools; targetLlvm = targetPackages.llvmPackages_9.llvm or llvmPackages_9.llvm; targetLlvmLibraries = targetPackages.llvmPackages_9.libraries or llvmPackages_9.libraries; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 }); llvmPackages_10 = recurseIntoAttrs (callPackage ../development/compilers/llvm/10 { @@ -16703,6 +16708,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_10.tools; targetLlvm = targetPackages.llvmPackages_10.llvm or llvmPackages_10.llvm; targetLlvmLibraries = targetPackages.llvmPackages_10.libraries or llvmPackages_10.libraries; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 }); llvmPackages_11 = recurseIntoAttrs (callPackage ../development/compilers/llvm/11 ({ @@ -16731,6 +16737,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_14.tools; targetLlvmLibraries = targetPackages.llvmPackages_14.libraries or llvmPackages_14.libraries; targetLlvm = targetPackages.llvmPackages_14.llvm or llvmPackages_14.llvm; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 })); llvmPackages_15 = recurseIntoAttrs (callPackage ../development/compilers/llvm/15 ({ From 9f2112827ff9216847ad7d70b46641fbe956a1f1 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 01:30:01 -0800 Subject: [PATCH 051/123] nix_2_3: pin back to gcc12Stdenv --- pkgs/tools/package-management/nix/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index aeb2a182336eb..aeb02f7368c68 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -1,4 +1,5 @@ { lib +, gcc12Stdenv , config , aws-sdk-cpp , boehmgc @@ -159,7 +160,10 @@ in lib.makeExtensible (self: ({ patch-monitorfdhup ]; maintainers = with lib.maintainers; [ flokli raitobezarius ]; - }).override { boehmgc = boehmgc-nix_2_3; }; + }).override { + boehmgc = boehmgc-nix_2_3; + stdenv = gcc12Stdenv; + }; nix_2_10 = common { version = "2.10.3"; From 16b4972e6efffcc4f8d987d1d30d7547ae35b321 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 01:30:13 -0800 Subject: [PATCH 052/123] gn: apply disable-warnings-if-gcc13 --- pkgs/development/tools/build-managers/gn/generic.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/gn/generic.nix b/pkgs/development/tools/build-managers/gn/generic.nix index 4214bb822b994..bb72e4bb20b4d 100644 --- a/pkgs/development/tools/build-managers/gn/generic.nix +++ b/pkgs/development/tools/build-managers/gn/generic.nix @@ -1,5 +1,6 @@ { stdenv, lib, fetchgit, darwin, writeText , ninja, python3 +, disable-warnings-if-gcc13 , ... }: @@ -17,7 +18,7 @@ let #endif // OUT_LAST_COMMIT_POSITION_H_ ''; -in stdenv.mkDerivation { +in disable-warnings-if-gcc13 (stdenv.mkDerivation { pname = "gn-unstable"; inherit version; @@ -57,4 +58,4 @@ in stdenv.mkDerivation { platforms = platforms.unix; maintainers = with maintainers; [ stesie matthewbauer primeos ]; }; -} +}) From 7c794e19969b5948edd0f7599a80d3ab123c4056 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 01:31:40 -0800 Subject: [PATCH 053/123] btor2tools: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7f14d16f16f68..d3f2f86e2612d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39766,7 +39766,9 @@ with pkgs; avy = callPackage ../applications/science/logic/avy { }; - btor2tools = callPackage ../applications/science/logic/btor2tools { }; + btor2tools = callPackage ../applications/science/logic/btor2tools { + stdenv = gcc12Stdenv; + }; boolector = callPackage ../applications/science/logic/boolector { stdenv = if stdenv.cc.isClang then overrideLibcxx llvmPackages_14.stdenv else stdenv; From 0c6510c5fae11ce6dfd0085efb3094d9c7474e6a Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 01:32:01 -0800 Subject: [PATCH 054/123] bazel: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d3f2f86e2612d..caf43f1a4dd0f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18579,7 +18579,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation; buildJdk = jdk11_headless; runJdk = jdk11_headless; - stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; + stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else gcc12Stdenv; bazel_self = bazel_5; }; @@ -18590,7 +18590,7 @@ with pkgs; runJdk = jdk11_headless; stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else - if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; + if stdenv.cc.isClang then llvmPackages.stdenv else gcc12Stdenv; bazel_self = bazel_6; }; From db9b7daeb25d7bbd906a09e3d0250accbc418e05 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 26 Nov 2023 17:52:39 -0800 Subject: [PATCH 055/123] binaryen: use gcc12Stdenv --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index caf43f1a4dd0f..5b6c81681dfc2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15587,6 +15587,7 @@ with pkgs; bigloo = callPackage ../development/compilers/bigloo { }; binaryen = callPackage ../development/compilers/binaryen { + stdenv = gcc12Stdenv; nodejs = nodejs-slim; inherit (python3Packages) filecheck; }; From f979c00d57abf2255e816b9a93f4f9e8f3601259 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 27 Nov 2023 01:20:34 -0800 Subject: [PATCH 056/123] bobcat: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b6c81681dfc2..92c7effb139c9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20718,7 +20718,9 @@ with pkgs; else callPackage ../os-specific/linux/bionic-prebuilt { }; - bobcat = callPackage ../development/libraries/bobcat { }; + bobcat = callPackage ../development/libraries/bobcat { + stdenv = gcc12Stdenv; + }; boehmgc = callPackage ../development/libraries/boehm-gc { }; From 85f7275d7d0f896a8e5ea2071b923f3566f03e63 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 18 Nov 2023 01:23:20 -0800 Subject: [PATCH 057/123] spike: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92c7effb139c9..81532359bcd49 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35373,7 +35373,9 @@ with pkgs; spice-vdagent = callPackage ../applications/virtualization/spice-vdagent { }; - spike = callPackage ../applications/virtualization/spike { }; + spike = callPackage ../applications/virtualization/spike { + stdenv = gcc12Stdenv; + }; tensorman = callPackage ../tools/misc/tensorman { }; From 6f4a2b2102145fb5e673bccecc663fb17f7f24a1 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 18 Nov 2023 01:19:25 -0800 Subject: [PATCH 058/123] sdrpp: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81532359bcd49..5d18ffc13e8e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24977,6 +24977,7 @@ with pkgs; sdrpp = callPackage ../applications/radio/sdrpp { inherit (darwin.apple_sdk.frameworks) AppKit; + stdenv = gcc12Stdenv; }; sigdigger = libsForQt5.callPackage ../applications/radio/sigdigger { }; From 985fbaeee4327d80eb5a53c3f7eb67c22a1e9faa Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:09:25 -0800 Subject: [PATCH 059/123] pybind: disable-warnings-if-gcc13 --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ffa25e0375b4..cd10be238eb6e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9841,7 +9841,7 @@ self: super: with self; { pybigwig = callPackage ../development/python-modules/pybigwig { }; - pybind11 = callPackage ../development/python-modules/pybind11 { }; + pybind11 = pkgs.disable-warnings-if-gcc13 (callPackage ../development/python-modules/pybind11 { }); pybindgen = callPackage ../development/python-modules/pybindgen { }; From cadec5dacfb0ad7b59be033141fbafe520441ec7 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:08:58 -0800 Subject: [PATCH 060/123] rocksdb: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d18ffc13e8e8..ffd726048e52a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24843,7 +24843,9 @@ with pkgs; rlottie = callPackage ../development/libraries/rlottie { }; - rocksdb = disable-warnings-if-gcc13 (callPackage ../development/libraries/rocksdb { }); + rocksdb = callPackage ../development/libraries/rocksdb { + stdenv = gcc12Stdenv; + }; rocksdb_7_10 = rocksdb.overrideAttrs rec { pname = "rocksdb"; From eba9dea7524c7301c652b8a52d0028f99aa6a3e6 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:26:02 -0800 Subject: [PATCH 061/123] blueprint: disable tests (time out) --- pkgs/development/compilers/blueprint/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/blueprint/default.nix b/pkgs/development/compilers/blueprint/default.nix index 99b275db2aa6a..f52b43f49a82a 100644 --- a/pkgs/development/compilers/blueprint/default.nix +++ b/pkgs/development/compilers/blueprint/default.nix @@ -45,7 +45,8 @@ stdenv.mkDerivation (finalAttrs: { ]; # requires xvfb-run - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.isDarwin + && false; # tests time out checkPhase = '' runHook preCheck From b5a29130565badbf3ee1c4c3718777c2d8e6f6ba Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:27:30 -0800 Subject: [PATCH 062/123] crossguid: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ffd726048e52a..c12bd4f18d9f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21006,7 +21006,9 @@ with pkgs; crocoddyl = callPackage ../development/libraries/crocoddyl { }; - crossguid = callPackage ../development/libraries/crossguid { }; + crossguid = callPackage ../development/libraries/crossguid { + stdenv = gcc12Stdenv; + }; cryptopp = callPackage ../development/libraries/crypto++ { }; From 8072342facc32b66834a4a5e51829cb3bc8d356a Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:28:00 -0800 Subject: [PATCH 063/123] curaengine: disable warnings if gcc13 --- pkgs/top-level/all-packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c12bd4f18d9f5..80ede463e5e6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35492,12 +35492,12 @@ with pkgs; slic3r = callPackage ../applications/misc/slic3r { }; - curaengine_stable = callPackage ../applications/misc/curaengine/stable.nix { }; + curaengine_stable = disable-warnings-if-gcc13 (callPackage ../applications/misc/curaengine/stable.nix { }); - curaengine = callPackage ../applications/misc/curaengine { + curaengine = disable-warnings-if-gcc13 (callPackage ../applications/misc/curaengine { inherit (python3.pkgs) libarcus; protobuf = protobuf_21; - }; + }); cura = libsForQt5.callPackage ../applications/misc/cura { }; From 4221042a69428e2af227bd4e857dd799c2bb4372 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:30:51 -0800 Subject: [PATCH 064/123] deepin: pin back to gcc12Stdenv --- pkgs/desktops/deepin/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 524e4ee0f1f0d..646d573067f14 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, libsForQt5 }: +{ lib, pkgs, stdenv, libsForQt5 }: let packages = self: let diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 80ede463e5e6c..f14fde29c5235 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38762,7 +38762,7 @@ with pkgs; cinnamon = recurseIntoAttrs (callPackage ../desktops/cinnamon { }); inherit (cinnamon) mint-x-icons mint-y-icons; - deepin = recurseIntoAttrs (callPackage ../desktops/deepin { }); + deepin = recurseIntoAttrs (callPackage ../desktops/deepin { stdenv = gcc12Stdenv; }); enlightenment = recurseIntoAttrs (callPackage ../desktops/enlightenment { }); From 7ce86f86d4efa4b0a0e254ffe7c62a624eee7e62 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:34:39 -0800 Subject: [PATCH 065/123] kodi-inputstream-ffmpeg-direct: disable warnings if gcc13 --- pkgs/top-level/kodi-packages.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/kodi-packages.nix b/pkgs/top-level/kodi-packages.nix index 4fa6c3064558b..744ddcb1b3961 100644 --- a/pkgs/top-level/kodi-packages.nix +++ b/pkgs/top-level/kodi-packages.nix @@ -1,4 +1,5 @@ -{ config, lib, newScope, kodi, libretro }: +{ config, lib, newScope, kodi, libretro +, disable-warnings-if-gcc13 }: with lib; @@ -152,7 +153,7 @@ let self = rec { inputstream-adaptive = callPackage ../applications/video/kodi/addons/inputstream-adaptive { }; - inputstream-ffmpegdirect = callPackage ../applications/video/kodi/addons/inputstream-ffmpegdirect { }; + inputstream-ffmpegdirect = disable-warnings-if-gcc13 (callPackage ../applications/video/kodi/addons/inputstream-ffmpegdirect { }); inputstream-rtmp = callPackage ../applications/video/kodi/addons/inputstream-rtmp { }; From 533fbf203a1bd7a7fa6c68fd98b53f0935d3064b Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:35:11 -0800 Subject: [PATCH 066/123] libe57format: disable warnings if gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f14fde29c5235..9cc784c967a2c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22750,7 +22750,7 @@ with pkgs; dwarfdump = libdwarf.bin; libdwarf_20210528 = callPackage ../development/libraries/libdwarf/20210528.nix { }; - libe57format = callPackage ../development/libraries/libe57format { }; + libe57format = disable-warnings-if-gcc13 (callPackage ../development/libraries/libe57format { }); libeatmydata = callPackage ../development/libraries/libeatmydata { }; From 70ca7cadf7ee4b676ad3054ae185b02616678f05 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:35:54 -0800 Subject: [PATCH 067/123] libfilezilla: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cc784c967a2c..cd9aca5187761 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22778,10 +22778,11 @@ with pkgs; libfido2 = callPackage ../development/libraries/libfido2 {}; - libfilezilla = disable-warnings-if-gcc13 - (darwin.apple_sdk_11_0.callPackage ../development/libraries/libfilezilla { + libfilezilla = + darwin.apple_sdk_11_0.callPackage ../development/libraries/libfilezilla { inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices; - }); + stdenv = gcc12Stdenv; + }; libfishsound = callPackage ../development/libraries/libfishsound { }; From 3b3edcc034591a8d8369ef98ce7641cc26715712 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:33:15 -0800 Subject: [PATCH 068/123] python-qt: add disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd9aca5187761..19960719e387e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24666,10 +24666,10 @@ with pkgs; pylode = callPackage ../misc/pylode { }; - python-qt = callPackage ../development/libraries/python-qt { + python-qt = disable-warnings-if-gcc13 (callPackage ../development/libraries/python-qt { python = python3; inherit (qt5) qmake qttools qtwebengine qtxmlpatterns; - }; + }); pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside { }; From 779adaea623e126d93d49d2fd64a822b60a97668 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:33:29 -0800 Subject: [PATCH 069/123] zeroc-ice: add disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19960719e387e..523fee1fd059b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36979,7 +36979,7 @@ with pkgs; zerobin = callPackage ../applications/networking/zerobin { }; - zeroc-ice = callPackage ../development/libraries/zeroc-ice { }; + zeroc-ice = disable-warnings-if-gcc13 (callPackage ../development/libraries/zeroc-ice { }); zeroc-ice-cpp11 = zeroc-ice.override { cpp11 = true; }; From 59929aa8804400757f7481a930624d9cc9db019b Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:34:04 -0800 Subject: [PATCH 070/123] google-cloud-cpp: add disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 523fee1fd059b..ea6a5162c1fb1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8798,7 +8798,7 @@ with pkgs; google-guest-oslogin = callPackage ../tools/virtualization/google-guest-oslogin { }; - google-cloud-cpp = callPackage ../development/libraries/google-cloud-cpp { }; + google-cloud-cpp = disable-warnings-if-gcc13 (callPackage ../development/libraries/google-cloud-cpp { }); google-java-format = callPackage ../development/tools/google-java-format { }; From ec29731d9ea426ec4e30ff80cb51ee5a7e5d2a1f Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:35:21 -0800 Subject: [PATCH 071/123] curl-impersonate: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea6a5162c1fb1..6885567960a07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7355,7 +7355,9 @@ with pkgs; curlWithGnuTls = curl.override { gnutlsSupport = true; opensslSupport = false; }; - curl-impersonate = darwin.apple_sdk_11_0.callPackage ../tools/networking/curl-impersonate { }; + curl-impersonate = + builtins.mapAttrs (_: disable-warnings-if-gcc13) + (darwin.apple_sdk_11_0.callPackage ../tools/networking/curl-impersonate { }); inherit (curl-impersonate) curl-impersonate-ff curl-impersonate-chrome; curlie = callPackage ../tools/networking/curlie { }; From 3c863433437c5bbccd34704db12c666296f5eb3a Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:36:11 -0800 Subject: [PATCH 072/123] osrm-backend: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6885567960a07..b20164c2279d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26873,7 +26873,7 @@ with pkgs; openxr-loader = callPackage ../development/libraries/openxr-loader { }; - osrm-backend = callPackage ../servers/osrm-backend { }; + osrm-backend = disable-warnings-if-gcc13 (callPackage ../servers/osrm-backend { }); oven-media-engine = callPackage ../servers/misc/oven-media-engine { }; From 2fe7b43073d1c2d703707bfb25cbd5f91e2852de Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:36:57 -0800 Subject: [PATCH 073/123] proj: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b20164c2279d5..e8709ff6ab80d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24617,9 +24617,9 @@ with pkgs; primesieve = callPackage ../applications/science/math/primesieve { }; - proj = callPackage ../development/libraries/proj { + proj = disable-warnings-if-gcc13 (callPackage ../development/libraries/proj { stdenv = if stdenv.cc.isClang then overrideLibcxx llvmPackages_13.stdenv else stdenv; - }; + }); proj_7 = callPackage ../development/libraries/proj/7.nix { }; From f0f2dba66344396fcc2c2d8bf466c1b0f37d2b2d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:37:13 -0800 Subject: [PATCH 074/123] gmsh: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8709ff6ab80d..ab8d93a9d02d3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39444,7 +39444,7 @@ with pkgs; ipopt = callPackage ../development/libraries/science/math/ipopt { }; - gmsh = callPackage ../applications/science/math/gmsh { }; + gmsh = disable-warnings-if-gcc13 (callPackage ../applications/science/math/gmsh { }); wcpg = callPackage ../development/libraries/science/math/wcpg { }; From d07242531990ea1dca9ab3b5d50ac61b8cbb1ad1 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:38:25 -0800 Subject: [PATCH 075/123] intel-media-sdk: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab8d93a9d02d3..1b4a93c93999e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9446,7 +9446,7 @@ with pkgs; inql = callPackage ../tools/security/inql { }; - intel-media-sdk = callPackage ../development/libraries/intel-media-sdk { }; + intel-media-sdk = disable-warnings-if-gcc13 (callPackage ../development/libraries/intel-media-sdk { }); intermodal = callPackage ../tools/misc/intermodal { }; From cba3305be3a9b069f69668631aafb0d4f5cb5cd4 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 00:18:13 -0800 Subject: [PATCH 076/123] waylandpp: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b4a93c93999e..a4a9c2c53d694 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25616,9 +25616,9 @@ with pkgs; wayland-protocols = callPackage ../development/libraries/wayland/protocols.nix { }; - waylandpp = callPackage ../development/libraries/waylandpp { + waylandpp = disable-warnings-if-gcc13 (callPackage ../development/libraries/waylandpp { graphviz = graphviz-nox; - }; + }); wcslib = callPackage ../development/libraries/science/astronomy/wcslib { }; From 4e3f9903160473c92d3a1134fa4a9425e0c2fbe9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 00:20:09 -0800 Subject: [PATCH 077/123] gnuradio: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4a9c2c53d694..6946fddcd8f76 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31773,12 +31773,12 @@ with pkgs; }; }; }; - gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix { + gnuradio3_8 = disable-warnings-if-gcc13 (callPackage ../applications/radio/gnuradio/wrapper.nix { unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix { inherit (darwin.apple_sdk.frameworks) CoreAudio; python = python3; }; - }; + }); gnuradio3_8Packages = lib.recurseIntoAttrs gnuradio3_8.pkgs; # A build without gui components and other utilites not needed if gnuradio is # used as a c++ library. From c10c60703fe16291771f9cb0ceaaf932f5853540 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:47:30 -0800 Subject: [PATCH 078/123] boringssl: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6946fddcd8f76..f8c9c5ca232fb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24460,7 +24460,7 @@ with pkgs; libressl = libressl_3_8; - boringssl = callPackage ../development/libraries/boringssl { }; + boringssl = disable-warnings-if-gcc13 (callPackage ../development/libraries/boringssl { }); wolfssl = darwin.apple_sdk_11_0.callPackage ../development/libraries/wolfssl { inherit (darwin.apple_sdk_11_0.frameworks) Security; From f899db20e54c5c5ca7ae79f3703b6ca9d095b906 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:48:24 -0800 Subject: [PATCH 079/123] rippled: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f8c9c5ca232fb..e7c129bf2bb90 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27330,9 +27330,9 @@ with pkgs; protobuf = protobuf_21; }; - rippled = callPackage ../servers/rippled { + rippled = disable-warnings-if-gcc13 (callPackage ../servers/rippled { boost = boost177; - }; + }); rippled-validator-keys-tool = callPackage ../servers/rippled/validator-keys-tool.nix { }; From da2a9297fe4814040702ee47ee06e10831470172 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:50:04 -0800 Subject: [PATCH 080/123] litecoin: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7c129bf2bb90..ec4de718537bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37196,10 +37196,10 @@ with pkgs; lightning-pool = callPackage ../applications/blockchains/lightning-pool { }; - litecoin = libsForQt5.callPackage ../applications/blockchains/litecoin { + litecoin = disable-warnings-if-gcc13 (libsForQt5.callPackage ../applications/blockchains/litecoin { inherit (darwin.apple_sdk.frameworks) AppKit; boost = pkgs.boost177; - }; + }); litecoind = litecoin.override { withGui = false; }; livedl = callPackage ../tools/misc/livedl { }; From a52b532c576b909ea4bcfd59454a33a395b4f706 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:50:50 -0800 Subject: [PATCH 081/123] pcsx2: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec4de718537bf..f5f09bc984179 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2770,7 +2770,7 @@ with pkgs; pcem = callPackage ../applications/emulators/pcem { }; - pcsx2 = qt6Packages.callPackage ../applications/emulators/pcsx2 { }; + pcsx2 = disable-warnings-if-gcc13 (qt6Packages.callPackage ../applications/emulators/pcsx2 { }); pcsxr = callPackage ../applications/emulators/pcsxr { }; From ae673049a40484f9aba719270e0a08d8be4f6b53 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:51:37 -0800 Subject: [PATCH 082/123] bees: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f5f09bc984179..5b17f46e5e96c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40210,7 +40210,9 @@ with pkgs; beep = callPackage ../misc/beep { }; - bees = callPackage ../tools/filesystems/bees { }; + bees = callPackage ../tools/filesystems/bees { + stdenv = gcc12Stdenv; + }; blahaj = callPackage ../tools/misc/blahaj { }; From e13dc3cdff260216f02a6ae77151648c7a2c5a9a Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:53:18 -0800 Subject: [PATCH 083/123] llvmPackages_13: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b17f46e5e96c..fbd7e66cccf66 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16733,6 +16733,7 @@ with pkgs; buildLlvmTools = buildPackages.llvmPackages_13.tools; targetLlvmLibraries = targetPackages.llvmPackages_13.libraries or llvmPackages_13.libraries; targetLlvm = targetPackages.llvmPackages_13.llvm or llvmPackages_13.llvm; + stdenv = if stdenv.cc.cc.isGNU or false then gcc12Stdenv else stdenv; # does not build with gcc13 })); llvmPackages_14 = recurseIntoAttrs (callPackage ../development/compilers/llvm/14 ({ From cf252c9a6eccf25f2858466ce8bb40ee2180e1a5 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:53:45 -0800 Subject: [PATCH 084/123] envoy: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fbd7e66cccf66..b4053f8a90f67 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26401,11 +26401,11 @@ with pkgs; engelsystem = callPackage ../servers/web-apps/engelsystem { php = php81; }; - envoy = callPackage ../servers/http/envoy { + envoy = disable-warnings-if-gcc13 (callPackage ../servers/http/envoy { go = go_1_20; jdk = openjdk11_headless; gn = gn1924; - }; + }); ergochat = callPackage ../servers/irc/ergochat { }; From 1bd25bcc7364ad85f485e3f1f36e5ef7dbccd231 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 01:54:16 -0800 Subject: [PATCH 085/123] python3Packages.ecos: disable-warnings-if-gcc13 --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cd10be238eb6e..7f85eaae393e5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3449,7 +3449,7 @@ self: super: with self; { ecoaliface = callPackage ../development/python-modules/ecoaliface { }; - ecos = callPackage ../development/python-modules/ecos { }; + ecos = pkgs.disable-warnings-if-gcc13 (callPackage ../development/python-modules/ecos { }); ecpy = callPackage ../development/python-modules/ecpy { }; From e0952b38b3c1c5ab026339bd1eb7456704416cc2 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 02:32:48 -0800 Subject: [PATCH 086/123] waylandpp: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4053f8a90f67..b794616202894 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25617,9 +25617,10 @@ with pkgs; wayland-protocols = callPackage ../development/libraries/wayland/protocols.nix { }; - waylandpp = disable-warnings-if-gcc13 (callPackage ../development/libraries/waylandpp { + waylandpp = callPackage ../development/libraries/waylandpp { graphviz = graphviz-nox; - }); + stdenv = gcc12Stdenv; + }; wcslib = callPackage ../development/libraries/science/astronomy/wcslib { }; From 309092e5d2493665aadf4361afc7bc6911f56256 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:35:29 -0800 Subject: [PATCH 087/123] opencollada: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b794616202894..185aa95f6bbfa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24364,7 +24364,7 @@ with pkgs; opencl-clhpp = callPackage ../development/libraries/opencl-clhpp { }; - opencollada = callPackage ../development/libraries/opencollada { }; + opencollada = disable-warnings-if-gcc13 (callPackage ../development/libraries/opencollada { }); opencore-amr = callPackage ../development/libraries/opencore-amr { }; From b899bb1bd15450152f6585ecbcb5b010b6736734 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:36:21 -0800 Subject: [PATCH 088/123] reproc: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 185aa95f6bbfa..7cbac7a95ac4c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34322,7 +34322,7 @@ with pkgs; rep-gtk = callPackage ../development/libraries/rep-gtk { }; - reproc = callPackage ../development/libraries/reproc { }; + reproc = disable-warnings-if-gcc13 (callPackage ../development/libraries/reproc { }); sawfish = callPackage ../applications/window-managers/sawfish { }; From 1ec7985e1c302c193279144f793d13558ab64ba6 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:36:38 -0800 Subject: [PATCH 089/123] memorymapping: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7cbac7a95ac4c..fb25ca7fabfe9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23957,7 +23957,7 @@ with pkgs; mediastreamer-openh264 = callPackage ../development/libraries/mediastreamer/msopenh264.nix { }; - memorymapping = callPackage ../development/libraries/memorymapping { }; + memorymapping = disable-warnings-if-gcc13 (callPackage ../development/libraries/memorymapping { }); memorymappingHook = makeSetupHook { name = "memorymapping-hook"; propagatedBuildInputs = [ memorymapping ]; From a640926f8b047d6fb62b950c89b96e2acaf4c3df Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:39:18 -0800 Subject: [PATCH 090/123] python3Packages.fasttext: disable-warnings-if-gcc13 --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7f85eaae393e5..be802f810d198 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3863,7 +3863,7 @@ self: super: with self; { fastrlock = callPackage ../development/python-modules/fastrlock { }; - fasttext = callPackage ../development/python-modules/fasttext { }; + fasttext = pkgs.disable-warnings-if-gcc13 (callPackage ../development/python-modules/fasttext { }); fasttext-predict = callPackage ../development/python-modules/fasttext-predict { }; From a04a391f5a21d6e33931611b8edb00630314748e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:39:43 -0800 Subject: [PATCH 091/123] gmsh: disable-warnings-if-gcc13 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index be802f810d198..64d701b82f23e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4524,9 +4524,9 @@ self: super: with self; { gmpy = callPackage ../development/python-modules/gmpy { }; - gmsh = toPythonModule (callPackage ../applications/science/math/gmsh { + gmsh = disable-warnings-if-gcc13 (toPythonModule (callPackage ../applications/science/math/gmsh { enablePython = true; - }); + })); gntp = callPackage ../development/python-modules/gntp { }; From a7a0942af98ba8c530d7695c607c0715b93ab39c Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:41:20 -0800 Subject: [PATCH 092/123] envoy: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb25ca7fabfe9..d267900363620 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26402,11 +26402,12 @@ with pkgs; engelsystem = callPackage ../servers/web-apps/engelsystem { php = php81; }; - envoy = disable-warnings-if-gcc13 (callPackage ../servers/http/envoy { + envoy = callPackage ../servers/http/envoy { go = go_1_20; jdk = openjdk11_headless; gn = gn1924; - }); + stdenv = gcc12Stdenv; + }; ergochat = callPackage ../servers/irc/ergochat { }; From 8d0c74040722a6f9ddaa585962ff5b8ab8a02ce4 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:42:01 -0800 Subject: [PATCH 093/123] usbguard: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d267900363620..28bff4c1a3282 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28977,7 +28977,7 @@ with pkgs; upscayl = callPackage ../applications/graphics/upscayl { }; - usbguard = callPackage ../os-specific/linux/usbguard { }; + usbguard = disable-warnings-if-gcc13 (callPackage ../os-specific/linux/usbguard { }); usbguard-notifier = callPackage ../os-specific/linux/usbguard-notifier { }; From 203fcee896e2fff6bff1d154d5d3c59d7beba79a Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:48:31 -0800 Subject: [PATCH 094/123] python3Packages.gmsh: typo fix --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 64d701b82f23e..5ec94b8d8ad7f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4524,7 +4524,7 @@ self: super: with self; { gmpy = callPackage ../development/python-modules/gmpy { }; - gmsh = disable-warnings-if-gcc13 (toPythonModule (callPackage ../applications/science/math/gmsh { + gmsh = pkgs.disable-warnings-if-gcc13 (toPythonModule (callPackage ../applications/science/math/gmsh { enablePython = true; })); From 5e4eeb98b2628763b32f6251122c292f2754f0a7 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:49:06 -0800 Subject: [PATCH 095/123] virtualbox: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 28bff4c1a3282..5d64e760a6796 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36293,10 +36293,10 @@ with pkgs; virtual-ans = callPackage ../applications/audio/virtual-ans { }; - virtualbox = libsForQt5.callPackage ../applications/virtualization/virtualbox { + virtualbox = disable-warnings-if-gcc13 (libsForQt5.callPackage ../applications/virtualization/virtualbox { stdenv = stdenv_32bit; inherit (gnome2) libIDL; - }; + }); virtualboxHardened = lowPrio (virtualbox.override { enableHardening = true; From 8cf22cde182d921ef59ba6cdb800aef6fa23613e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:30:07 -0800 Subject: [PATCH 096/123] v8: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d64e760a6796..e055ff1acbcf7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25493,7 +25493,7 @@ with pkgs; let stdenv' = if stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc.cc) "16" then overrideLibcxx llvmPackages_15.stdenv - else stdenv; + else gcc12Stdenv; in { stdenv = if stdenv'.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; From c0f1bb662ed0f5cc7798761d25400635be390b68 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:31:31 -0800 Subject: [PATCH 097/123] openmw.tes3mp: disable-warnings-if-gcc13 --- pkgs/games/openmw/tes3mp.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index 48454b42df299..5662f2356833f 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -7,13 +7,14 @@ , luajit , makeWrapper , symlinkJoin +, disable-warnings-if-gcc13 }: # revisions are taken from https://github.com/GrimKriegor/TES3MP-deploy let # raknet could also be split into dev and lib outputs - raknet = stdenv.mkDerivation { + raknet = disable-warnings-if-gcc13 (stdenv.mkDerivation { pname = "raknet"; version = "unstable-2020-01-19"; @@ -35,7 +36,7 @@ let installPhase = '' install -Dm555 lib/libRakNetLibStatic.a $out/lib/libRakNetLibStatic.a ''; - }; + }); coreScripts = stdenv.mkDerivation { pname = "corescripts"; From 3cea547e808467c9fb7502c56005cd5f800f5f67 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:35:46 -0800 Subject: [PATCH 098/123] python-qt: hit it in the head with a hammer --- pkgs/top-level/all-packages.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e055ff1acbcf7..ba4bce6fe71a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24669,9 +24669,15 @@ with pkgs; pylode = callPackage ../misc/pylode { }; - python-qt = disable-warnings-if-gcc13 (callPackage ../development/libraries/python-qt { + python-qt = (callPackage ../development/libraries/python-qt { python = python3; - inherit (qt5) qmake qttools qtwebengine qtxmlpatterns; + inherit (builtins.mapAttrs (_: pkg: pkg.override (previousArgs: lib.optionalAttrs (previousArgs ? stdenv) { stdenv = gcc12Stdenv; })) qt5) + qmake qttools qtwebengine qtxmlpatterns; + stdenv = gcc12Stdenv; + }) + .overrideAttrs(previousAttrs: { + NIX_CFLAGS_COMPILE = "-w"; + meta = previousAttrs.meta // { broken = true; }; }); pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside { }; @@ -25680,6 +25686,7 @@ with pkgs; wxSVG = callPackage ../development/libraries/wxSVG { wxGTK = wxGTK32; + stdenv = gcc12Stdenv; }; wtk = callPackage ../development/libraries/wtk { }; From 1c219e85d0274bfc13849112d08d008777138a63 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:41:42 -0800 Subject: [PATCH 099/123] vertcoind: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ba4bce6fe71a6..95edcb33a4276 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37289,9 +37289,9 @@ with pkgs; vertcoin = libsForQt5.callPackage ../applications/blockchains/vertcoin { withGui = true; }; - vertcoind = callPackage ../applications/blockchains/vertcoin { + vertcoind = disable-warnings-if-gcc13 (callPackage ../applications/blockchains/vertcoin { withGui = false; - }; + }); wasabiwallet = callPackage ../applications/blockchains/wasabiwallet { }; From 6b172d043f299091533d41201e7cddb6553c4017 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:45:16 -0800 Subject: [PATCH 100/123] openjfx: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 95edcb33a4276..0350610135db0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16440,7 +16440,7 @@ with pkgs; hugs = callPackage ../development/interpreters/hugs { }; inherit (javaPackages) openjfx11 openjfx15 openjfx17 openjfx19 openjfx20 openjfx21; - openjfx = openjfx17; + openjfx = openjfx17.override { stdenv = gcc12Stdenv; }; openjdk8-bootstrap = javaPackages.compiler.openjdk8-bootstrap; openjdk8 = javaPackages.compiler.openjdk8; From ef2484730a0ee8f188db33fa880548795a6e70e6 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:45:24 -0800 Subject: [PATCH 101/123] chia-plotter: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0350610135db0..bef969b7d03f8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37095,7 +37095,7 @@ with pkgs; chia-dev-tools = callPackage ../applications/blockchains/chia-dev-tools { }; - chia-plotter = callPackage ../applications/blockchains/chia-plotter { }; + chia-plotter = disable-warnings-if-gcc13 (callPackage ../applications/blockchains/chia-plotter { }); clboss = callPackage ../applications/blockchains/clboss { }; From 34e0cb6e51a496d509348c70a7ec9da7ac734e9d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:54:38 -0800 Subject: [PATCH 102/123] wownero: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bef969b7d03f8..60d1bb499b115 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37297,7 +37297,7 @@ with pkgs; wasabibackend = callPackage ../applications/blockchains/wasabibackend { }; - wownero = callPackage ../applications/blockchains/wownero { }; + wownero = disable-warnings-if-gcc13 (callPackage ../applications/blockchains/wownero { }); zcash = callPackage ../applications/blockchains/zcash { inherit (darwin.apple_sdk.frameworks) Security; From 94a69cb5b1828b6b176b976fb740661ad1696bc7 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:54:51 -0800 Subject: [PATCH 103/123] litecoind: disable-warnings-if-gcc13 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60d1bb499b115..81b0477635c05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37210,7 +37210,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit; boost = pkgs.boost177; }); - litecoind = litecoin.override { withGui = false; }; + litecoind = disable-warnings-if-gcc13 (litecoin.override { withGui = false; }); livedl = callPackage ../tools/misc/livedl { }; From c4ef1b650f3808645371742b9124251e3a1f1863 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:55:22 -0800 Subject: [PATCH 104/123] qgrep: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81b0477635c05..db39877c8c6ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12532,6 +12532,7 @@ with pkgs; qgrep = callPackage ../tools/text/qgrep { inherit (darwin.apple_sdk.frameworks) CoreServices CoreFoundation; + stdenv = gcc12Stdenv; }; qhull = callPackage ../development/libraries/qhull { }; From 4a98add3afe2bef1027f5f4902539d40a1e9d9c8 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sat, 2 Dec 2023 02:35:41 +0000 Subject: [PATCH 105/123] qrcode: update latest rev to fix compiler errors handle truncated files and give proper prototypes. (cherry picked from commit a406725e5925e4eb4853f4f877de35e199b0d371) --- pkgs/tools/graphics/qrcode/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/graphics/qrcode/default.nix b/pkgs/tools/graphics/qrcode/default.nix index ce623e25db0e2..e870f53da82e8 100644 --- a/pkgs/tools/graphics/qrcode/default.nix +++ b/pkgs/tools/graphics/qrcode/default.nix @@ -2,17 +2,15 @@ stdenv.mkDerivation { pname = "qrcode"; - version = "unstable-2022-01-10"; + version = "unstable-2023-12-02"; src = fetchFromGitHub { owner = "qsantos"; repo = "qrcode"; - rev = "f4475866bbf963ad118db936060f606eedc224d5"; - hash = "sha256-IbWYSAc0PvSWcxKaPUXDldGDCK/lPZjptepYtLppPmA="; + rev = "96fac69ad3e4f616ce75c0e3ef4ed0574cfab315"; + hash = "sha256-Aesjys6FchB6qcLRWJNGfcEZRlO3stw3+IM8Xe2pF+Q="; }; - env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result"; - makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; installPhase = '' From 1f1cde27d0c6fb7a564637695b7709cf8c85fd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 1 Dec 2023 02:25:18 +0100 Subject: [PATCH 106/123] liberasurecode: remove -Werror (cherry picked from commit 76b013db0005475a04830075d3083a07429bbbef) --- pkgs/applications/misc/liberasurecode/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/liberasurecode/default.nix b/pkgs/applications/misc/liberasurecode/default.nix index 5910bc3eb532e..f94496d0b125e 100644 --- a/pkgs/applications/misc/liberasurecode/default.nix +++ b/pkgs/applications/misc/liberasurecode/default.nix @@ -23,6 +23,9 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace doc/doxygen.cfg.in \ --replace "GENERATE_MAN = NO" "GENERATE_MAN = YES" + + substituteInPlace Makefile.am src/Makefile.am \ + --replace "-Werror" "" ''; nativeBuildInputs = [ autoreconfHook doxygen installShellFiles ]; @@ -30,9 +33,8 @@ stdenv.mkDerivation rec { buildInputs = [ zlib ]; configureFlags = [ + "--disable-werror" "--enable-doxygen" - ] ++ lib.optionals stdenv.cc.isClang [ - "CFLAGS=-Wno-error=strict-prototypes" ]; postInstall = '' From 9257bbce14dc4c5d926dcfb1ee9fb71c431e58ad Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:29:03 -0800 Subject: [PATCH 107/123] radicle-upstream: add missing sourceProvenance --- .../applications/version-management/radicle-upstream/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/version-management/radicle-upstream/default.nix b/pkgs/applications/version-management/radicle-upstream/default.nix index c88d0b9d38666..51365d0c4a31b 100644 --- a/pkgs/applications/version-management/radicle-upstream/default.nix +++ b/pkgs/applications/version-management/radicle-upstream/default.nix @@ -76,6 +76,7 @@ let license = licenses.gpl3Plus; maintainers = with maintainers; [ d-xo ]; platforms = [ "x86_64-linux" "x86_64-darwin" ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; in if stdenv.isDarwin From f333f07231d8914213dcae6af011a04d29e44c62 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 17:29:16 -0800 Subject: [PATCH 108/123] radicle-upstream: mark broken (patchelf fails) --- .../applications/version-management/radicle-upstream/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/version-management/radicle-upstream/default.nix b/pkgs/applications/version-management/radicle-upstream/default.nix index 51365d0c4a31b..f211e9d5f23c6 100644 --- a/pkgs/applications/version-management/radicle-upstream/default.nix +++ b/pkgs/applications/version-management/radicle-upstream/default.nix @@ -77,6 +77,7 @@ let maintainers = with maintainers; [ d-xo ]; platforms = [ "x86_64-linux" "x86_64-darwin" ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + broken = true; }; in if stdenv.isDarwin From eb3ca48e1ce5b3f9de03be4860422e96419bba08 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 1 Dec 2023 01:08:52 -0800 Subject: [PATCH 109/123] eris: mark broken --- pkgs/development/nim-packages/eris/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/nim-packages/eris/default.nix b/pkgs/development/nim-packages/eris/default.nix index 2d7b229ca1a1d..41538ef46a7bf 100644 --- a/pkgs/development/nim-packages/eris/default.nix +++ b/pkgs/development/nim-packages/eris/default.nix @@ -32,5 +32,6 @@ buildNimPackage (final: prev: { maintainers = with lib.maintainers; [ ehmry ]; mainProgram = "eriscmd"; badPlatforms = lib.platforms.darwin; + broken = true; # goes into an infinite loop spamming stderr with junk }; }) From 1302af19aad4a46c00e11f968080392b2b130d2c Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 18:08:02 -0800 Subject: [PATCH 110/123] werkzeug: mark broken (download is 404) --- pkgs/development/python-modules/werkzeug/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix index db045e77c52fe..a5ce9dc8b0489 100644 --- a/pkgs/development/python-modules/werkzeug/default.nix +++ b/pkgs/development/python-modules/werkzeug/default.nix @@ -78,5 +78,6 @@ buildPythonPackage rec { ''; license = licenses.bsd3; maintainers = with maintainers; [ ]; + broken = true; # download returns 404 }; } From a4b72e9fde88ae3976b370d9b496e2aefd73b624 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 18:08:16 -0800 Subject: [PATCH 111/123] ccemux: mark broken (download fails hash validation) --- pkgs/applications/emulators/ccemux/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/emulators/ccemux/default.nix b/pkgs/applications/emulators/ccemux/default.nix index 15fb0f88593f0..d0a1429e6d3a6 100644 --- a/pkgs/applications/emulators/ccemux/default.nix +++ b/pkgs/applications/emulators/ccemux/default.nix @@ -64,5 +64,6 @@ stdenv.mkDerivation rec { sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.mit; maintainers = with maintainers; [ CrazedProgrammer viluon ]; + broken = true; # download of CCEmuX-cct.jar fails hash validation }; } From 01775cc14fb137eae23669fb529554aeac861963 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Dec 2023 23:40:14 -0800 Subject: [PATCH 112/123] certmgr-selfsigned: mark broken, uncached FOD failure --- pkgs/tools/security/certmgr/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/security/certmgr/default.nix b/pkgs/tools/security/certmgr/default.nix index da62e7d0568eb..f5023e5c7890e 100644 --- a/pkgs/tools/security/certmgr/default.nix +++ b/pkgs/tools/security/certmgr/default.nix @@ -39,6 +39,7 @@ in name = "cloudflare-certmgr-pull-51.patch"; url = "https://github.com/cloudflare/certmgr/compare/232e0adf8379db28ab74c46e0dd3eddb3cd8f2ea...55c595a4a2dc871726b3c8337469daf5597718a3.patch"; sha256 = "0jhsw159d2mgybvbbn6pmvj4yqr5cwcal5fjwkcn9m4f4zlb6qrs"; + meta.broken = true; # hash mismatch, FOD not on cache.nixos.org }) ]; }; From 52f25d554e68f9e2eae90f4a697b78f50ac638a0 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 12:43:56 -0800 Subject: [PATCH 113/123] tesseract: pin back to gcc12Stdenv --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db39877c8c6ec..4cf039e236c19 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35851,7 +35851,7 @@ with pkgs; tessen = callPackage ../tools/security/tessen { }; - inherit (lib.mapAttrs (_: disable-warnings-if-gcc13) + inherit (lib.mapAttrs (_: pkg: pkg.override { stdenv = gcc12Stdenv; }) (callPackage ../applications/graphics/tesseract { inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; })) From dacf010edc8ee543c67f9a856c9c394c0a347d62 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 13:43:20 -0800 Subject: [PATCH 114/123] tesseract: fix --- pkgs/applications/graphics/tesseract/default.nix | 12 ++++++++---- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/tesseract/default.nix b/pkgs/applications/graphics/tesseract/default.nix index 70649d633b852..0ea8a1f8b259a 100644 --- a/pkgs/applications/graphics/tesseract/default.nix +++ b/pkgs/applications/graphics/tesseract/default.nix @@ -1,12 +1,16 @@ -{ callPackage, lowPrio, Accelerate, CoreGraphics, CoreVideo}: +{ callPackage, lowPrio, Accelerate, CoreGraphics, CoreVideo +, gcc12Stdenv }: let - base3 = callPackage ./tesseract3.nix {}; - base4 = callPackage ./tesseract4.nix {}; + base3 = callPackage ./tesseract3.nix { stdenv = gcc12Stdenv; }; + base4 = callPackage ./tesseract4.nix { stdenv = gcc12Stdenv; }; base5 = callPackage ./tesseract5.nix { inherit Accelerate CoreGraphics CoreVideo; + stdenv = gcc12Stdenv; + }; + languages = callPackage ./languages.nix { + stdenv = gcc12Stdenv; }; - languages = callPackage ./languages.nix {}; in { tesseract3 = callPackage ./wrapper.nix { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cf039e236c19..3cbbdf6ba7cd1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35851,10 +35851,10 @@ with pkgs; tessen = callPackage ../tools/security/tessen { }; - inherit (lib.mapAttrs (_: pkg: pkg.override { stdenv = gcc12Stdenv; }) + inherit (callPackage ../applications/graphics/tesseract { inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; - })) + }) tesseract3 tesseract4 tesseract5; From 984260792a04df60b686ab454122495a23e1b2a4 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 3 Dec 2023 23:57:00 -0800 Subject: [PATCH 115/123] tesseract4: mark broken --- pkgs/applications/graphics/tesseract/tesseract4.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/tesseract/tesseract4.nix b/pkgs/applications/graphics/tesseract/tesseract4.nix index aecdf58186d05..05b1594e5badf 100644 --- a/pkgs/applications/graphics/tesseract/tesseract4.nix +++ b/pkgs/applications/graphics/tesseract/tesseract4.nix @@ -41,5 +41,6 @@ stdenv.mkDerivation rec { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ viric erikarvstedt ]; platforms = with lib.platforms; linux ++ darwin; + broken = true; }; } From 7440c347e82c7fe0ef02f0b464d496853be683dc Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 12:21:17 -0800 Subject: [PATCH 116/123] skjold: mark broken --- pkgs/development/tools/skjold/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/skjold/default.nix b/pkgs/development/tools/skjold/default.nix index e827e727a9570..35679c0843b2f 100644 --- a/pkgs/development/tools/skjold/default.nix +++ b/pkgs/development/tools/skjold/default.nix @@ -77,5 +77,6 @@ buildPythonApplication rec { changelog = "https://github.com/twu/skjold/releases/tag/v${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; + broken = true; # does not build with gcc13 }; } From f73ea3ba71947f71381925db4b0551b5b61800b1 Mon Sep 17 00:00:00 2001 From: Madoura Date: Sun, 3 Dec 2023 18:25:44 -0600 Subject: [PATCH 117/123] rocmPackages_5: pin stdenv to GCC 12 Try reverting this on a future ROCm release. Addresses: https://github.com/NixOS/nixpkgs/issues/271943 --- pkgs/development/rocm-modules/5/default.nix | 9 +++++++-- .../development/rocm-modules/5/llvm/default.nix | 17 +++++++++-------- .../5/llvm/stage-1/clang-unwrapped.nix | 5 +++-- .../rocm-modules/5/llvm/stage-1/lld.nix | 5 +++-- .../rocm-modules/5/llvm/stage-1/llvm.nix | 2 +- .../rocm-modules/5/llvm/stage-1/runtimes.nix | 3 ++- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/pkgs/development/rocm-modules/5/default.nix b/pkgs/development/rocm-modules/5/default.nix index d5f1c2678c4e1..6814825b2f9b3 100644 --- a/pkgs/development/rocm-modules/5/default.nix +++ b/pkgs/development/rocm-modules/5/default.nix @@ -1,4 +1,5 @@ -{ callPackage +{ gcc12Stdenv # FIXME: Try removing this with a new ROCm release https://github.com/NixOS/nixpkgs/issues/271943 +, callPackage , recurseIntoAttrs , symlinkJoin , fetchFromGitHub @@ -73,10 +74,11 @@ in rec { # Broken, too many errors rdc = callPackage ./rdc { inherit rocmUpdateScript rocm-smi rocm-runtime; + stdenv = gcc12Stdenv; # stdenv = llvm.rocmClangStdenv; }; - rocm-docs-core = python3Packages.callPackage ./rocm-docs-core { }; + rocm-docs-core = python3Packages.callPackage ./rocm-docs-core { stdenv = gcc12Stdenv; }; ## ROCm-Developer-Tools ## hip-common = callPackage ./hip-common { @@ -107,17 +109,20 @@ in rec { rocprofiler = callPackage ./rocprofiler { inherit rocmUpdateScript clr rocm-core rocm-thunk rocm-device-libs roctracer rocdbgapi rocm-smi hsa-amd-aqlprofile-bin; inherit (llvm) clang; + stdenv = gcc12Stdenv; }; # Needs GCC roctracer = callPackage ./roctracer { inherit rocmUpdateScript rocm-device-libs rocm-runtime clr; + stdenv = gcc12Stdenv; }; # Needs GCC rocgdb = callPackage ./rocgdb { inherit rocmUpdateScript; elfutils = elfutils.override { enableDebuginfod = true; }; + stdenv = gcc12Stdenv; }; rocdbgapi = callPackage ./rocdbgapi { diff --git a/pkgs/development/rocm-modules/5/llvm/default.nix b/pkgs/development/rocm-modules/5/llvm/default.nix index 9226fb87802c7..9c8919165a516 100644 --- a/pkgs/development/rocm-modules/5/llvm/default.nix +++ b/pkgs/development/rocm-modules/5/llvm/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ # stdenv FIXME: Try changing back to this with a new ROCm release https://github.com/NixOS/nixpkgs/issues/271943 + gcc12Stdenv , callPackage , rocmUpdateScript , wrapBintoolsWith @@ -12,18 +13,18 @@ let ## Stage 1 ## # Projects - llvm = callPackage ./stage-1/llvm.nix { inherit rocmUpdateScript; }; - clang-unwrapped = callPackage ./stage-1/clang-unwrapped.nix { inherit rocmUpdateScript llvm; }; - lld = callPackage ./stage-1/lld.nix { inherit rocmUpdateScript llvm; }; + llvm = callPackage ./stage-1/llvm.nix { inherit rocmUpdateScript; stdenv = gcc12Stdenv; }; + clang-unwrapped = callPackage ./stage-1/clang-unwrapped.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; }; + lld = callPackage ./stage-1/lld.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; }; # Runtimes - runtimes = callPackage ./stage-1/runtimes.nix { inherit rocmUpdateScript llvm; }; + runtimes = callPackage ./stage-1/runtimes.nix { inherit rocmUpdateScript llvm; stdenv = gcc12Stdenv; }; ## Stage 2 ## # Helpers bintools-unwrapped = callPackage ./stage-2/bintools-unwrapped.nix { inherit llvm lld; }; bintools = wrapBintoolsWith { bintools = bintools-unwrapped; }; - rStdenv = callPackage ./stage-2/rstdenv.nix { inherit llvm clang-unwrapped lld runtimes bintools; }; + rStdenv = callPackage ./stage-2/rstdenv.nix { inherit llvm clang-unwrapped lld runtimes bintools; stdenv = gcc12Stdenv; }; in rec { inherit llvm @@ -40,8 +41,8 @@ in rec { ## Stage 3 ## # Helpers - clang = callPackage ./stage-3/clang.nix { inherit llvm lld clang-unwrapped bintools libc libunwind libcxxabi libcxx compiler-rt; }; - rocmClangStdenv = overrideCC stdenv clang; + clang = callPackage ./stage-3/clang.nix { inherit llvm lld clang-unwrapped bintools libc libunwind libcxxabi libcxx compiler-rt; stdenv = gcc12Stdenv; }; + rocmClangStdenv = overrideCC gcc12Stdenv clang; # Projects clang-tools-extra = callPackage ./stage-3/clang-tools-extra.nix { inherit rocmUpdateScript llvm clang-unwrapped; stdenv = rocmClangStdenv; }; diff --git a/pkgs/development/rocm-modules/5/llvm/stage-1/clang-unwrapped.nix b/pkgs/development/rocm-modules/5/llvm/stage-1/clang-unwrapped.nix index 113313f4e0665..5a61732ffd2d4 100644 --- a/pkgs/development/rocm-modules/5/llvm/stage-1/clang-unwrapped.nix +++ b/pkgs/development/rocm-modules/5/llvm/stage-1/clang-unwrapped.nix @@ -1,10 +1,11 @@ -{ callPackage +{ stdenv +, callPackage , rocmUpdateScript , llvm }: callPackage ../base.nix rec { - inherit rocmUpdateScript; + inherit stdenv rocmUpdateScript; targetName = "clang-unwrapped"; targetDir = "clang"; extraBuildInputs = [ llvm ]; diff --git a/pkgs/development/rocm-modules/5/llvm/stage-1/lld.nix b/pkgs/development/rocm-modules/5/llvm/stage-1/lld.nix index a7b042eabfe65..5ca8bca25a338 100644 --- a/pkgs/development/rocm-modules/5/llvm/stage-1/lld.nix +++ b/pkgs/development/rocm-modules/5/llvm/stage-1/lld.nix @@ -1,10 +1,11 @@ -{ callPackage +{ stdenv +, callPackage , rocmUpdateScript , llvm }: callPackage ../base.nix rec { - inherit rocmUpdateScript; + inherit stdenv rocmUpdateScript; buildMan = false; # No man pages to build targetName = "lld"; targetDir = targetName; diff --git a/pkgs/development/rocm-modules/5/llvm/stage-1/llvm.nix b/pkgs/development/rocm-modules/5/llvm/stage-1/llvm.nix index 51959ec8bc325..82bd55411a246 100644 --- a/pkgs/development/rocm-modules/5/llvm/stage-1/llvm.nix +++ b/pkgs/development/rocm-modules/5/llvm/stage-1/llvm.nix @@ -4,7 +4,7 @@ }: callPackage ../base.nix { - inherit rocmUpdateScript; + inherit stdenv rocmUpdateScript; requiredSystemFeatures = [ "big-parallel" ]; isBroken = stdenv.isAarch64; # https://github.com/RadeonOpenCompute/ROCm/issues/1831#issuecomment-1278205344 } diff --git a/pkgs/development/rocm-modules/5/llvm/stage-1/runtimes.nix b/pkgs/development/rocm-modules/5/llvm/stage-1/runtimes.nix index 5f6f278ab10e4..0364a02e6e59b 100644 --- a/pkgs/development/rocm-modules/5/llvm/stage-1/runtimes.nix +++ b/pkgs/development/rocm-modules/5/llvm/stage-1/runtimes.nix @@ -1,11 +1,12 @@ { lib +, stdenv , callPackage , rocmUpdateScript , llvm }: callPackage ../base.nix rec { - inherit rocmUpdateScript; + inherit stdenv rocmUpdateScript; buildDocs = false; buildMan = false; buildTests = false; From cdde0962ef712a309a2701bbe79baf8ae324351f Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 26 Nov 2023 17:53:23 -0800 Subject: [PATCH 118/123] DONTPUSH: check both stores locally --- pkgs/top-level/nohydra/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/nohydra/default.nix b/pkgs/top-level/nohydra/default.nix index 9bd92a432340c..b50cce5d62511 100644 --- a/pkgs/top-level/nohydra/default.nix +++ b/pkgs/top-level/nohydra/default.nix @@ -209,7 +209,8 @@ let # triggering it being built (yet) let path = builtins.unsafeDiscardStringContext outPath; - exists = builtins.pathExists path; + exists = builtins.pathExists path || + builtins.pathExists "/mnt/coldstore/${path}"; in if !exists then From 7e719b1d81709484cf4e36af9cf66a305f3f7b92 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 14:11:12 -0800 Subject: [PATCH 119/123] spirv-llvm-translator: disable-warnings-if-gcc13 --- pkgs/development/compilers/spirv-llvm-translator/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index f19501a6d7d82..b99019a0f3d7e 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -7,6 +7,7 @@ , llvm , spirv-headers , spirv-tools +, disable-warnings-if-gcc13 }: let @@ -37,7 +38,7 @@ let hash = "sha256-NoIoa20+2sH41rEnr8lsMhtfesrtdPINiXtUnxYVm8s="; } else throw "Incompatible LLVM version."; in -stdenv.mkDerivation { +disable-warnings-if-gcc13 (stdenv.mkDerivation { pname = "SPIRV-LLVM-Translator"; inherit (branch) version; @@ -91,4 +92,4 @@ stdenv.mkDerivation { platforms = platforms.unix; maintainers = with maintainers; [ gloaming ]; }; -} +}) From fae492eda907a0fd6fde97a22ead732bd5ddfdb8 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 22:00:29 -0800 Subject: [PATCH 120/123] disable-warnings-if-gcc13: use -Wno-error instead of -w --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3cbbdf6ba7cd1..4fe99c5cf160b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15871,7 +15871,7 @@ with pkgs; if (pkg.stdenv.cc.cc.isGNU or false && lib.versionAtLeast pkg.stdenv.cc.cc.version "13.0") then pkg.overrideAttrs(previousAttrs: previousAttrs // { env = previousAttrs.env or {} // { - NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + " -w"; + NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + " -Wno-error"; }; }) else pkg; From 39860363beef14239d568515f99813b5a54a5bae Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 22:08:51 -0800 Subject: [PATCH 121/123] Revert "disable-warnings-if-gcc13: use -Wno-error instead of -w" This reverts commit fae492eda907a0fd6fde97a22ead732bd5ddfdb8. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4fe99c5cf160b..3cbbdf6ba7cd1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15871,7 +15871,7 @@ with pkgs; if (pkg.stdenv.cc.cc.isGNU or false && lib.versionAtLeast pkg.stdenv.cc.cc.version "13.0") then pkg.overrideAttrs(previousAttrs: previousAttrs // { env = previousAttrs.env or {} // { - NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + " -Wno-error"; + NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + " -w"; }; }) else pkg; From 62f4050f4ed605ceef2390d6e2606fb1e10906ce Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 4 Dec 2023 20:44:22 -0800 Subject: [PATCH 122/123] rocmPackages_5.llvm: use gcc12Stdenv if stdenv.cc.cc.isGNU>=13 --- pkgs/development/rocm-modules/5/llvm/base.nix | 8 ++++++++ pkgs/development/rocm-modules/5/llvm/stage-2/rstdenv.nix | 1 + 2 files changed, 9 insertions(+) diff --git a/pkgs/development/rocm-modules/5/llvm/base.nix b/pkgs/development/rocm-modules/5/llvm/base.nix index 82de9e6f3665c..4fae8fbf506d0 100644 --- a/pkgs/development/rocm-modules/5/llvm/base.nix +++ b/pkgs/development/rocm-modules/5/llvm/base.nix @@ -1,5 +1,6 @@ { lib , stdenv +, gcc12Stdenv , fetchFromGitHub , rocmUpdateScript , pkg-config @@ -44,6 +45,13 @@ , isBroken ? false }: +let stdenv' = stdenv; in +let stdenv = + if stdenv'.cc.cc.isGNU or false && lib.versionAtLeast stdenv'.cc.cc.version "13.0" + then gcc12Stdenv + else stdenv'; +in + let llvmNativeTarget = if stdenv.isx86_64 then "X86" diff --git a/pkgs/development/rocm-modules/5/llvm/stage-2/rstdenv.nix b/pkgs/development/rocm-modules/5/llvm/stage-2/rstdenv.nix index 45d369a6541c3..3820d45a2b814 100644 --- a/pkgs/development/rocm-modules/5/llvm/stage-2/rstdenv.nix +++ b/pkgs/development/rocm-modules/5/llvm/stage-2/rstdenv.nix @@ -12,6 +12,7 @@ overrideCC stdenv (wrapCCWith rec { inherit bintools; libcxx = runtimes; cc = clang-unwrapped; + gccForLibs = stdenv.cc.cc; extraPackages = [ llvm From 0ba9a1a7fe09cefdc6e2c49f35720c127af22d46 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 5 Dec 2023 17:57:55 -0800 Subject: [PATCH 123/123] texlive: pin back to gcc12Stdenv --- pkgs/tools/typesetting/tex/texlive/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 1a497c6affaa9..a9d6e717318fc 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -2,7 +2,10 @@ - source: ../../../../../doc/languages-frameworks/texlive.xml - current html: https://nixos.org/nixpkgs/manual/#sec-language-texlive */ -{ stdenv, lib, fetchurl, runCommand, writeShellScript, writeText, buildEnv +{ lib +#, stdenv +, gcc12Stdenv +, fetchurl, runCommand, writeShellScript, writeText, buildEnv , callPackage, ghostscript_headless, harfbuzz , makeWrapper, installShellFiles , python3, ruby, perl, tk, jdk, bash, snobol4 @@ -11,6 +14,7 @@ , useFixedHashes ? true , recurseIntoAttrs }: +let stdenv = gcc12Stdenv; in let # various binaries (compiled) bin = callPackage ./bin.nix {