From af7a3ab90cf88018d6db8c64d4ba0cfd8c8b0d9b Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:23:55 -0700 Subject: [PATCH 01/10] gtk3, defaultCrateOverrides: use at-spi2-core directly at-spi2-atk and atk were merged into at-spi2-core. Update direct consumers to reference the canonical package name. --- pkgs/defaultCrateOverrides/default.nix | 4 ++-- pkgs/gtk/3.x.nix | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/defaultCrateOverrides/default.nix b/pkgs/defaultCrateOverrides/default.nix index d0eccd3de..bf973a448 100644 --- a/pkgs/defaultCrateOverrides/default.nix +++ b/pkgs/defaultCrateOverrides/default.nix @@ -2,7 +2,7 @@ lib, stdenv, alsa-lib, - atk, + at-spi2-core, autoconf, automake, cairo, @@ -407,7 +407,7 @@ atk-sys = attrs: { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ atk ]; + buildInputs = [ at-spi2-core ]; }; # Assumes it can run Command::new(env::var("CARGO")).arg("locate-project") diff --git a/pkgs/gtk/3.x.nix b/pkgs/gtk/3.x.nix index 90e4ebf3f..dd19b1d6c 100644 --- a/pkgs/gtk/3.x.nix +++ b/pkgs/gtk/3.x.nix @@ -20,8 +20,7 @@ cairo, pango, gdk-pixbuf, - atk, - at-spi2-atk, + at-spi2-core, gobject-introspection, buildPackages, withIntrospection ? @@ -150,8 +149,7 @@ stdenv.mkDerivation (finalAttrs: { #TODO: colord? propagatedBuildInputs = [ - at-spi2-atk - atk + at-spi2-core cairo expat fribidi From ecd5799c1527597e0326ca98470bd75d751d382b Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:00 -0700 Subject: [PATCH 02/10] stripJavaArchivesHook: use perlPackages.strip-nondeterminism directly --- pkgs/stripJavaArchivesHook/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/stripJavaArchivesHook/default.nix b/pkgs/stripJavaArchivesHook/default.nix index 96db7d00f..08242a70a 100644 --- a/pkgs/stripJavaArchivesHook/default.nix +++ b/pkgs/stripJavaArchivesHook/default.nix @@ -1,6 +1,6 @@ -{ makeSetupHook, strip-nondeterminism }: +{ makeSetupHook, perlPackages }: makeSetupHook { name = "strip-java-archives-hook"; - propagatedBuildInputs = [ strip-nondeterminism ]; + propagatedBuildInputs = [ perlPackages.strip-nondeterminism ]; } ./strip-java-archives.sh From cea4406c6de80a3be647812f4e976138f1364c15 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:04 -0700 Subject: [PATCH 03/10] buildFHSEnv: use bashFHS directly instead of bashInteractiveFHS alias --- pkgs/buildFHSEnvBubblewrap/buildFHSEnv.nix | 2 +- pkgs/buildFHSEnvChroot/env.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/buildFHSEnvBubblewrap/buildFHSEnv.nix b/pkgs/buildFHSEnvBubblewrap/buildFHSEnv.nix index 2a6229c41..eaa511d4f 100644 --- a/pkgs/buildFHSEnvBubblewrap/buildFHSEnv.nix +++ b/pkgs/buildFHSEnvBubblewrap/buildFHSEnv.nix @@ -70,7 +70,7 @@ let glibcLocales (if isMultiBuild then glibc_multi else glibc) gcc.cc.lib - bashInteractiveFHS + bashFHS coreutils less shadow diff --git a/pkgs/buildFHSEnvChroot/env.nix b/pkgs/buildFHSEnvChroot/env.nix index 49b2b32c8..2afbbdc88 100644 --- a/pkgs/buildFHSEnvChroot/env.nix +++ b/pkgs/buildFHSEnvChroot/env.nix @@ -55,7 +55,7 @@ let glibcLocales (if isMultiBuild then glibc_multi else glibc) (toString gcc.cc.lib) - bashInteractiveFHS + bashFHS coreutils less shadow From 6073097519a524b7e24adb5555266a8d08fdf556 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:09 -0700 Subject: [PATCH 04/10] python2, pypy: use tcl.pkgs instead of tclPackages alias --- python/cpython/2.7/default.nix | 5 ++--- python/pypy/default.nix | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/python/cpython/2.7/default.nix b/python/cpython/2.7/default.nix index aba648d5a..c43bfab14 100644 --- a/python/cpython/2.7/default.nix +++ b/python/cpython/2.7/default.nix @@ -14,7 +14,6 @@ sqlite, tcl ? null, tk ? null, - tclPackages, libx11 ? null, x11Support ? false, zlib, @@ -326,8 +325,8 @@ stdenv.mkDerivation ( setupHook = python-setup-hook sitePackages; - postPatch = lib.optionalString (x11Support && ((tclPackages.tix or null) != null)) '' - substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tclPackages.tix}/lib'" + postPatch = lib.optionalString (x11Support && ((tcl.pkgs.tix or null) != null)) '' + substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tcl.pkgs.tix}/lib'" ''; postInstall = '' diff --git a/python/pypy/default.nix b/python/pypy/default.nix index 11c93e29e..9f8ff0501 100644 --- a/python/pypy/default.nix +++ b/python/pypy/default.nix @@ -17,7 +17,6 @@ expat, tcl, tk, - tclPackages ? { }, libx11, gdbm, db, @@ -177,9 +176,9 @@ stdenv.mkDerivation rec { substituteInPlace lib_pypy/pypy_tools/build_cffi_imports.py \ --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES" - ${lib.optionalString (tclPackages ? tix) '' + ${lib.optionalString (tcl.pkgs ? tix) '' substituteInPlace "lib-python/${if isPy3k then "3/tkinter/tix.py" else "2.7/lib-tk/Tix.py"}" \ - --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tclPackages.tix}/lib'" + --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tcl.pkgs.tix}/lib'" ''} ''; From 595ff761e81466a79db11bb9236c7b640efe7ebf Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:14 -0700 Subject: [PATCH 05/10] opensnitch-ebpf: drop redundant clang-tools arg Already available via the existing with llvmPackages scope. --- pkgs/linux-support/pkgs/opensnitch-ebpf/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/linux-support/pkgs/opensnitch-ebpf/default.nix b/pkgs/linux-support/pkgs/opensnitch-ebpf/default.nix index a49206391..b77efeb7d 100644 --- a/pkgs/linux-support/pkgs/opensnitch-ebpf/default.nix +++ b/pkgs/linux-support/pkgs/opensnitch-ebpf/default.nix @@ -2,7 +2,6 @@ lib, kernel, stdenv, - clang-tools, llvmPackages, elfutils, flex, From 31387798cbe19bf63beacef8bd5e0da8efdcd44f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:19 -0700 Subject: [PATCH 06/10] ccache: use xcbuild instead of xcodebuild alias --- pkgs/ccache/default.nix | 2 +- python/pkgs/lxml/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/ccache/default.nix b/pkgs/ccache/default.nix index a21dbd0b0..a23891d56 100644 --- a/pkgs/ccache/default.nix +++ b/pkgs/ccache/default.nix @@ -13,7 +13,7 @@ zstd, bashInteractive, doctest, - xcodebuild, + xcbuild, makeWrapper, writableTmpDirAsHomeHook, }: diff --git a/python/pkgs/lxml/default.nix b/python/pkgs/lxml/default.nix index d81d07825..37d5befe3 100644 --- a/python/pkgs/lxml/default.nix +++ b/python/pkgs/lxml/default.nix @@ -9,7 +9,7 @@ setuptools, # native dependencies - xcodebuild, + xcbuild, pkgsBuildHost, pkgsHostTarget, }: @@ -35,7 +35,7 @@ buildPythonPackage rec { cython setuptools ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; # required for build time dependency check nativeBuildInputs = [ From 530aeb75281bea86e7e2a4583286527bd73a85f6 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:23 -0700 Subject: [PATCH 07/10] OVMF: use libisoburn instead of xorriso alias --- pkgs/OVMF/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/OVMF/default.nix b/pkgs/OVMF/default.nix index 35bba275e..2e195db12 100644 --- a/pkgs/OVMF/default.nix +++ b/pkgs/OVMF/default.nix @@ -8,7 +8,7 @@ llvmPackages, fetchFromGitLab, python3, - xorriso, + libisoburn, qemu, dosfstools, mtools, @@ -18,7 +18,7 @@ systemManagementModeRequired ? secureBoot && stdenv.hostPlatform.isx86, # Whether to create an nvram variables template # which includes the MSFT secure boot keys - # Note: Requires pexpect, xorriso, and mtools to be available + # Note: Requires pexpect, libisoburn, and mtools to be available msVarsTemplate ? false, # When creating the nvram variables template with # the MSFT keys, we also must provide a certificate @@ -123,7 +123,7 @@ edk2.mkDerivation projectDscPath (finalAttrs: { ++ lib.optionals msVarsTemplate [ python3 python3.pkgs.pexpect - xorriso + libisoburn qemu dosfstools mtools From af42575e4d15cde7cc7e2551f0da2dc4375365d8 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:30 -0700 Subject: [PATCH 08/10] vlang: use glfw3 instead of glfw alias --- pkgs/vlang/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/vlang/default.nix b/pkgs/vlang/default.nix index 152a5c381..1796521e6 100644 --- a/pkgs/vlang/default.nix +++ b/pkgs/vlang/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - glfw, + glfw3, freetype, openssl, makeWrapper, @@ -57,7 +57,7 @@ stdenv.mkDerivation { }; propagatedBuildInputs = [ - glfw + glfw3 freetype openssl sqlite From a86b99474e3381866f35210c509d04b003998bcd Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 07:24:41 -0700 Subject: [PATCH 09/10] top-level: remove redundant entries and move aliases Remove callPackage entries for packages that are auto-imported via pkgs//default.nix: nix-update-script, mesa, pnpmConfigHook, fetchPnpmDeps, R, gnome, coreutils, rustup-toolchain-install-master. Move pure aliases to aliases/nixpkgs.nix where they don't need to be in the top-level overlay: at-spi2-atk, atk, bashInteractiveFHS, buildGradlePackage, buildMavenPackage, buildNpmApplication, buildPnpmApplication, buildYarnApplication, clang-manpages, clang-tools, flang, glfw, libclang, libclc, libllvm, lldb, llvm-manpages, luajitPackages, luarocks, nixStatic, nodejs_latest, strip-nondeterminism, tclPackages, texinfo6, texinfo7, texinfoInteractive, valgrind-light, xcodebuild, xorriso, python/pypy package set aliases. --- aliases/nixpkgs.nix | 40 ++++++++++++++++ pkgs-many/binutils/darwin.nix | 4 +- pkgs/writers/scripts.nix | 6 +-- top-level.nix | 86 ++--------------------------------- 4 files changed, 50 insertions(+), 86 deletions(-) diff --git a/aliases/nixpkgs.nix b/aliases/nixpkgs.nix index 27f790742..4fd4a5efd 100644 --- a/aliases/nixpkgs.nix +++ b/aliases/nixpkgs.nix @@ -33,12 +33,15 @@ mapAliases { armTrustedFirmwareRK3588 = arm-trusted-firmware.rk3588; armTrustedFirmwareS905 = arm-trusted-firmware.s905; armTrustedFirmwareTools = arm-trusted-firmware.tools; + at-spi2-atk = at-spi2-core; # merged into at-spi2-core + atk = at-spi2-core; # merged into at-spi2-core autoconf269 = autoconf.v2_69; autoconf271 = autoconf.v2_71; automake116x = automake.v1_16; automake118x = automake.v1_18; autoreconfHook269 = autoconf.v2_69.autoreconfHook; autoreconfHook271 = autoconf.v2_71.autoreconfHook; + bashInteractiveFHS = bashFHS; binutils-unwrapped = binutils.unwrapped; binutils-unwrapped-all-targets = binutils.unwrapped-all-targets; binutils-unwrapped_2_38 = binutils.unwrapped.v2_38; @@ -51,7 +54,14 @@ mapAliases { buildGo125Module = go.v1_25.buildModule; buildGo126Module = go.v1_26.buildModule; buildGo127Module = go.v1_27.buildModule; + buildGradlePackage = java.buildGradlePackage; + buildMavenPackage = java.buildMavenPackage; + buildNpmApplication = nodejs.buildNpmApplication; + buildPnpmApplication = nodejs.buildPnpmApplication; + buildYarnApplication = nodejs.buildYarnApplication; bzip2_1_1 = throw "'bzip2_1_1' has been removed as it was an unmaintained 2020 snapshot; use 'bzip2' instead"; + clang-manpages = llvmPackages.clang-manpages; + clang-tools = llvmPackages.clang-tools; clang_18 = llvm.v18.pkgs.clang; clang_19 = llvm.v19.pkgs.clang; clang_20 = llvm.v20.pkgs.clang; @@ -93,10 +103,12 @@ mapAliases { fftwLongDouble = fftw.long_double; fftwQuad = fftw.quad; fftwSinglePrec = fftw.float; + flang = llvm.v20.pkgs.flang; flang_20 = llvm.v20.pkgs.flang; flang_21 = llvm.v21.pkgs.flang; flex_2_5_39 = flex.v2_5; fuse3 = fuse; + glfw = glfw3; gmp6 = gmp.v6_3; gmpxx = gmp.withCxx; gnugrep = grep; @@ -138,11 +150,14 @@ mapAliases { kernelPackagesExtensions = throw "kernelPackagesExtensions has been removed in ekapkgs. Use config.overlays.linux instead"; kotlinc = kotlin; libcIconv = libc: callPackage ../pkgs-many/libiconv/libc.nix { inherit libc; }; + libclang = llvmPackages.libclang; + libclc = llvmPackages.libclc; libffiReal = libffi.real; libffi_3_3 = libffi.v3_3; libiconv-darwin = libiconv.darwin; libiconvReal = libiconv.real; libidn2 = libidn.v2; + libllvm = llvmPackages.libllvm; libmpg123 = mpg123; libmysqlclient = mariadb-connector-c; libnghttp2 = nghttp2; @@ -162,10 +177,12 @@ mapAliases { lld_19 = llvm.v19.pkgs.lld; lld_20 = llvm.v20.pkgs.lld; lld_21 = llvm.v21.pkgs.lld; + lldb = llvmPackages.lldb; lldb_18 = llvm.v18.pkgs.lldb; lldb_19 = llvm.v19.pkgs.lldb; lldb_20 = llvm.v20.pkgs.lldb; lldb_21 = llvm.v21.pkgs.lldb; + llvm-manpages = llvmPackages.llvm-manpages; llvm_18 = llvm.v18.pkgs.llvm; llvm_19 = llvm.v19.pkgs.llvm; llvm_20 = llvm.v20.pkgs.llvm; @@ -180,9 +197,11 @@ mapAliases { lua5_4_compat = lua.v5_4_compat; lua5_5 = lua.v5_5; lua5_5_compat = lua.v5_5_compat; + luajitPackages = lua.luajit_2_1.pkgs; luajit_2_0 = lua.luajit_2_0; luajit_2_1 = lua.luajit_2_1; luajit_openresty = lua.luajit_openresty; + luarocks = luaPackages.luarocks_bootstrap; makeInitrd = linux.makeInitrd; makeModulesClosure = linux.makeModulesClosure; man = man-db; @@ -191,10 +210,12 @@ mapAliases { ncurses5 = ncurses.v5; ncurses6 = ncurses.v6; nimble = nim; + nixStatic = pkgsStatic.nix; nodejs_18 = nodejs.v18; nodejs_20 = nodejs.v20; nodejs_22 = nodejs.v22; nodejs_23 = nodejs.v23; + nodejs_latest = nodejs.v26; openjdk = java; openjdk11 = java.v11; openssl_1_1 = openssl.v1_1; @@ -207,15 +228,31 @@ mapAliases { perl542 = perl.v5_42; perl542Packages = lib.recurseIntoAttrs perl.v5_42.pkgs; phpExtensions = php.buildPecl; + pypy27Packages = pypy27.pkgs; + pypy2Packages = pypy2.pkgs; + pypy310Packages = pypy310.pkgs; + pypy311Packages = pypy311.pkgs; + pypy3Packages = pypy3.pkgs; + pypyPackages = pypy.pkgs; + python27Packages = python27.pkgs; + python310Packages = python310.pkgs; + python311Packages = python311.pkgs; + python314Packages = python314.pkgs; + python315Packages = python315.pkgs; qemu-utils = qemu; r = r-lang; rLang = r-lang; scala_2_13 = scala.v2_13; scala_3 = scala; + strip-nondeterminism = perlPackages.strip-nondeterminism; su = shadow; tcl-8_5 = tcl.v8_5; tcl-8_6 = tcl.v8_6; tcl-9_0 = tcl.v9_0; + tclPackages = tcl.pkgs; + texinfo6 = texinfo.v6; + texinfo7 = texinfo.v7; + texinfoInteractive = texinfo.interactive; tk-8_5 = tk.v8_5; tk-8_6 = tk.v8_6; tk-9_0 = tk.v9_0; @@ -284,6 +321,7 @@ mapAliases { ubootUtilite = uboot.ubootUtilite; ubootVisionFive2 = uboot.ubootVisionFive2; ubootWandboard = uboot.ubootWandboard; + valgrind-light = valgrind.light; wafHook = waf.hook; webrtc-audio-processing_0_3 = webrtc-audio-processing.v0_3; webrtc-audio-processing_1 = webrtc-audio-processing.v1; @@ -296,6 +334,8 @@ mapAliases { wrapGAppsNoGuiHook = gtk3.wrapGAppsNoGuiHook; wrapRustc = rustPackages.wrapRustc; wrapRustcWith = rustPackages.wrapRustcWith; + xcodebuild = xcbuild; + xorriso = libisoburn; xxHash = xxhash; # keep-sorted end diff --git a/pkgs-many/binutils/darwin.nix b/pkgs-many/binutils/darwin.nix index c719cef0f..e9d4082e5 100644 --- a/pkgs-many/binutils/darwin.nix +++ b/pkgs-many/binutils/darwin.nix @@ -5,7 +5,7 @@ clang-unwrapped, ld64, llvm, - llvm-manpages, + llvmPackages, makeWrapper, enableManpages ? stdenvNoCC.targetPlatform == stdenvNoCC.hostPlatform, }: @@ -81,7 +81,7 @@ stdenvNoCC.mkDerivation { if [ -e "$llvmPath/$llvmTool" ]; then ln -s "$llvmPath/$llvmTool" "$out/bin/${targetPrefix}$cctoolsTool" fi - ${linkManPages llvm-manpages "$llvmTool" "$cctoolsTool"} + ${linkManPages llvmPackages.llvm-manpages "$llvmTool" "$cctoolsTool"} done for tool in ${toString cctools_cmds}; do diff --git a/pkgs/writers/scripts.nix b/pkgs/writers/scripts.nix index 3021714d2..205fedb2f 100644 --- a/pkgs/writers/scripts.nix +++ b/pkgs/writers/scripts.nix @@ -1182,7 +1182,7 @@ rec { ]) // { interpreter = - if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then + if pythonPackages != pkgs.pypy2.pkgs || pythonPackages != pkgs.pypy3.pkgs then if libraries == [ ] then python.interpreter else if (lib.isFunction libraries) then @@ -1220,7 +1220,7 @@ rec { ::: */ - writePyPy2 = makePythonWriter pkgs.pypy2 pkgs.pypy2Packages buildPackages.pypy2Packages; + writePyPy2 = makePythonWriter pkgs.pypy2 pkgs.pypy2.pkgs buildPackages.pypy2.pkgs; /** writePyPy2Bin takes the same arguments as writePyPy2 but outputs a directory (like writeScriptBin) @@ -1274,7 +1274,7 @@ rec { ::: */ - writePyPy3 = makePythonWriter pkgs.pypy3 pkgs.pypy3Packages buildPackages.pypy3Packages; + writePyPy3 = makePythonWriter pkgs.pypy3 pkgs.pypy3.pkgs buildPackages.pypy3.pkgs; /** writePyPy3Bin takes the same arguments as writePyPy3 but outputs a directory (like writeScriptBin) diff --git a/top-level.nix b/top-level.nix index 01b8de905..bbb0dd235 100644 --- a/top-level.nix +++ b/top-level.nix @@ -33,7 +33,6 @@ final: prev: with final; { inherit (stdenv) hostPlatform; }; - nix-update-script = callPackage ./pkgs/nix-update-script { }; nixos = null; haskell = callPackage ./haskell { inherit config; }; @@ -57,8 +56,6 @@ final: prev: with final; { # Creates development environments with running services using ekaos modules mkDevShell = (callPackage ./dev-shell { }).mkDevShell; - # Default to gitMinimal to keep the fetcher's closure small; the `git` - # argument stays overridable for callers that need a different build. nix-prefetch-git = callPackage ./pkgs/nix-prefetch-git { git = gitMinimal; }; freshBootstrapTools = @@ -73,13 +70,7 @@ final: prev: with final; { # nv-codec-headers version aliases for ffmpeg nv-codec-headers-12 = nv-codec-headers.override { majorVersion = "12"; }; - at-spi2-atk = at-spi2-core; # merged into at-spi2-core - atk = at-spi2-core; # merged into at-spi2-core mpi = null; # fftwMpi, boost - nodejs_latest = nodejs.v26; - xcodebuild = xcbuild; - - valgrind-light = valgrind.light; # Darwin packages use the ordinary package scope and shared package directories. bootstrapStdenv = stdenv.override (old: { @@ -438,15 +429,9 @@ final: prev: with final; { json-schema-for-humans = with python3Packages; toPythonApplication json-schema-for-humans; libGLU = mesa_glu; - - # On macOS, the SDK provides the GLUT framework in `stdenv`. Packages - # that use `libGLX` on macOS may need to depend on `freeglut` - # directly if this doesn’t work. libdbusmenu-gtk3 = libdbusmenu.gtk3; - libglut = freeglut; libva-minimal = callPackage ./pkgs/libva { minimal = true; }; - mesa = callPackage ./pkgs/mesa { }; mesa_i686 = pkgsi686Linux.mesa; libgbm = callPackage ./pkgs/mesa/gbm.nix { }; mesa-gl-headers = callPackage ./pkgs/mesa/headers.nix { }; @@ -466,11 +451,8 @@ final: prev: with final; { }; }; - # TODO: Remove alias libjpeg = libjpeg_turbo; - xorriso = libisoburn; - # Less secure variant of lowdown for use inside Nix builds. lowdown-unsandboxed = lowdown.override { enableDarwinSandbox = false; @@ -492,9 +474,6 @@ final: prev: with final; { po4a = perlPackages.Po4a; - pnpmConfigHook = callPackage ./pkgs/pnpmConfigHook { }; - fetchPnpmDeps = callPackage ./pkgs/fetchPnpmDeps { }; - inherit (callPackages ./pkgs/fetchYarnDeps { }) fetchYarnDeps fixup-yarn-lock @@ -562,18 +541,9 @@ final: prev: with final; { buildGoModule = go.buildModule; - R = callPackage ./pkgs/R { }; - rPackages = callPackage ./r { inherit config; }; - buildMavenPackage = java.buildMavenPackage; - buildGradlePackage = java.buildGradlePackage; buildNpmPackage = nodejs.buildNpmPackage; - buildNpmApplication = nodejs.buildNpmApplication; - buildPnpmApplication = nodejs.buildPnpmApplication; - buildYarnApplication = nodejs.buildYarnApplication; - - gnome = callPackage ./pkgs/gnome { }; gnuStdenv = if stdenv.cc.isGNU then @@ -695,11 +665,9 @@ final: prev: with final; { }); # gcc-releases is auto-imported from pkgs-many/gcc-releases/ via mkManyVariants - # Individual versions: gcc-releases.v13, gcc-releases.v14, gcc-releases.v15 gcc13 = gcc-releases.v13; gcc14 = gcc-releases.v14; gcc15 = gcc-releases.v15; - gcc_latest = gcc15; libgccjit = gcc.cc.override { @@ -828,17 +796,13 @@ final: prev: with final; { bashFHS = callPackage ./pkgs/bash/5.nix { forFHSEnv = true; }; - bashInteractiveFHS = bashFHS; - # Python interpreters. All standard library modules are included except for tkinter, which is - # available as `pythonPackages.tkinter` and can be used as any other Python package. python = python3; python2 = python27; python3 = python313; - # pythonPackages further below, but assigned here because they need to be in sync - python2Packages = lib.dontRecurseIntoAttrs python27Packages; - python3Packages = lib.dontRecurseIntoAttrs python313Packages; + python2Packages = lib.dontRecurseIntoAttrs python27.pkgs; + python3Packages = lib.dontRecurseIntoAttrs python313.pkgs; pypy = pypy2; pypy2 = pypy27; @@ -890,19 +854,8 @@ final: prev: with final; { ; # Python package sets. - python27Packages = python27.pkgs; - python310Packages = python310.pkgs; - python311Packages = python311.pkgs; python312Packages = lib.recurseIntoAttrs python312.pkgs; python313Packages = lib.recurseIntoAttrs python313.pkgs; - python314Packages = python314.pkgs; - python315Packages = python315.pkgs; - pypyPackages = pypy.pkgs; - pypy2Packages = pypy2.pkgs; - pypy27Packages = pypy27.pkgs; - pypy3Packages = pypy3.pkgs; - pypy310Packages = pypy310.pkgs; - pypy311Packages = pypy311.pkgs; pythonManylinuxPackages = callPackage ./python/manylinux { }; @@ -947,8 +900,6 @@ final: prev: with final; { throw "mesonEmulatorHook may only be added to nativeBuildInputs when the target binaries can't be executed; however you are attempting to use it in a situation where ${stdenv.hostPlatform.config} can execute ${stdenv.targetPlatform.config}. Consider only adding mesonEmulatorHook according to a conditional based canExecute in your package expression." ); - coreutils = callPackage ./pkgs/coreutils { }; - # The coreutils above is built with dependencies from # bootstrapping. We cannot override it here, because that pulls in # openssl from the previous stage as well. @@ -974,7 +925,6 @@ final: prev: with final; { conf = ./pkgs-many/openssl/3.0/legacy.cnf; }; - makeWrapper = makeShellWrapper; arrayUtilities = let arrayUtilitiesPackages = makeScopeWithSplicing' { @@ -991,7 +941,7 @@ final: prev: with final; { }; in lib.recurseIntoAttrs arrayUtilitiesPackages; - strip-nondeterminism = perlPackages.strip-nondeterminism; + makeWrapper = makeShellWrapper; readline70 = callPackage ./pkgs/readline/7.0.nix { }; readline = callPackage ./pkgs/readline/8.3.nix { }; @@ -1009,10 +959,6 @@ final: prev: with final; { perlPackages = perl.pkgs; - texinfo6 = texinfo.v6; - texinfo7 = texinfo.v7; - texinfoInteractive = texinfo.interactive; - # On non-GNU systems we need GNU Gettext for libintl. libintl = if stdenv.hostPlatform.libc != "glibc" then gettext else null; @@ -1073,8 +1019,6 @@ final: prev: with final; { gawkextlib = callPackage ./pkgs/gawk/gawkextlib.nix { }; gawkInteractive = gawk.override { interactive = true; }; - tclPackages = tcl.pkgs; - pam = if stdenv.hostPlatform.isLinux then linux-pam @@ -1160,7 +1104,6 @@ final: prev: with final; { docbook-xsl-ns # was docbook-xsl-ns ; - # Alias for compatibility docbook-xsl = docbook-xsl-nons; inherit (callPackage ./pkgs/libxml2 { }) @@ -1170,7 +1113,7 @@ final: prev: with final; { c-aresMinimal = callPackage ./pkgs/c-ares { withCMake = false; }; - libkrb5 = krb5; # TODO(de11n) Try to make krb5 reuse libkrb5 as a dependency + libkrb5 = krb5; ngtcp2-gnutls = callPackage ./pkgs/ngtcp2/gnutls.nix { }; @@ -1222,8 +1165,6 @@ final: prev: with final; { forPlatform = stdenv.targetPlatform; # offset by 1 so it works in nativeBuildInputs }; - glfw = glfw3; - gtk3 = (callPackage ./pkgs/gtk/3.x.nix { trackerSupport = false; @@ -1302,8 +1243,6 @@ final: prev: with final; { # nix defaults to v2_34 (stable). Variants: nix.v2_28, ..., nix.v2_35, nix.git # Access individual components via nixVersions.nixComponents_2_34.nix-store, etc. - nixStatic = pkgsStatic.nix; - # Backwards-compatible nixVersions and nixComponents scopes for splicing. # The nixComponents_* attrs are constructed independently (not via nix.vX_Y.pkgs) # to avoid infinite recursion with the splice infrastructure. @@ -1503,10 +1442,7 @@ final: prev: with final; { # ValueError: ZIP does not support timestamps before 1980 ensureNewerSourcesForZipFilesHook = ensureNewerSourcesHook { year = "1980"; }; - libclang = llvmPackages.libclang; - clang-manpages = llvmPackages.clang-manpages; clang = llvmPackages.clang; - clang-tools = llvmPackages.clang-tools; clangStdenv = if stdenv.cc.isClang then stdenv else lib.lowPrio llvmPackages.stdenv; libcxxStdenv = if stdenv.hostPlatform.isDarwin then stdenv else lib.lowPrio llvmPackages.libcxxStdenv; @@ -1591,14 +1527,6 @@ final: prev: with final; { else prev.llvm.git.pkgs; - # Common LLVM packages from the default version - lld = llvmPackages.lld; - lldb = llvmPackages.lldb; - flang = llvm.v20.pkgs.flang; - libclc = llvmPackages.libclc; - libllvm = llvmPackages.libllvm; - llvm-manpages = llvmPackages.llvm-manpages; - # Lua is auto-imported from pkgs-many/lua via mkManyVariants # lua defaults to v5_4 (Lua 5.4.7) as the Lua interpreter # lua.pkgs provides the full Lua package scope (awesome-wm-widgets, etc.) @@ -1606,9 +1534,8 @@ final: prev: with final; { # LuaJIT variants accessible as: lua.luajit_2_0, lua.luajit_2_1, lua.luajit_openresty # Package scopes accessible as: lua.v5_3.pkgs, lua.luajit_2_0.pkgs, etc. + lld = llvmPackages.lld; luaPackages = lua.pkgs; - luajitPackages = lua.luajit_2_1.pkgs; - luarocks = luaPackages.luarocks_bootstrap; poppler-utils = poppler.override { suffix = "utils"; @@ -1696,8 +1623,6 @@ final: prev: with final; { texlivePackages = lib.recurseIntoAttrs (lib.mapAttrs (_: v: v.build) texlive.pkgs); # Rust is auto-imported from pkgs-many/rust via mkManyVariants - # Individual versions: rust.v1_91, rust.v1_98, etc. - # Package scopes: rust.pkgs, rust.v1_91.pkgs, etc. rustPackages = rust.pkgs; inherit (rustPackages) @@ -1745,7 +1670,6 @@ final: prev: with final; { buildPgrxExtension = callPackage ./pkgs/cargo-pgrx/buildPgrxExtension.nix { }; rust-bindgen-unwrapped = callPackage ./pkgs/rust-bindgen/unwrapped.nix { }; - rustup-toolchain-install-master = callPackage ./pkgs/rustup-toolchain-install-master { }; mkNugetDeps = null; # TODO(corepkgs): implement NuGet dependency fetcher mkNugetSource = null; # TODO(corepkgs): implement NuGet source builder From 21ff12d94cde1767cc2bb2666d69d6d2109e3179 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Sep 2026 11:01:27 -0700 Subject: [PATCH 10/10] nixVersions: derive nixComponents from nix mkManyVariants Instead of independently constructing each nixComponents scope in top-level.nix with duplicated version/src/hash data, expose the component scope via passthru.pkgs on each nix variant and collect them in nixVersions. This removes ~100 lines of duplicated fetchFromGitHub/version data from top-level.nix. The splice infrastructure continues to work via generateSplicesForMkScope ["nixVersions" "nixComponents_2_X"]. --- pkgs-many/nix/generic.nix | 6 +- top-level.nix | 198 +++++++++----------------------------- 2 files changed, 52 insertions(+), 152 deletions(-) diff --git a/pkgs-many/nix/generic.nix b/pkgs-many/nix/generic.nix index c3fe1c827..405a65079 100644 --- a/pkgs-many/nix/generic.nix +++ b/pkgs-many/nix/generic.nix @@ -142,8 +142,10 @@ basePackage.overrideAttrs (oldAttrs: { // mkVariantPassthru variantArgs // { inherit variantArgs; - # Individual component packages are accessible via nixVersions.nixComponents_2_X - # (not via passthru.pkgs) to avoid infinite recursion with the splice infrastructure. + # The spliced component scope. nixVersions collects these for the splice + # infrastructure (generateSplicesForMkScope ["nixVersions" "nixComponents_2_X"]). + # Accessing passthru does NOT force derivation evaluation, so this is safe. + pkgs = nixComponents; ekapkgs-update.skip = false; ekapkgs-update.semver-strategy = "patch"; }; diff --git a/top-level.nix b/top-level.nix index bbb0dd235..90184f867 100644 --- a/top-level.nix +++ b/top-level.nix @@ -1243,163 +1243,61 @@ final: prev: with final; { # nix defaults to v2_34 (stable). Variants: nix.v2_28, ..., nix.v2_35, nix.git # Access individual components via nixVersions.nixComponents_2_34.nix-store, etc. - # Backwards-compatible nixVersions and nixComponents scopes for splicing. - # The nixComponents_* attrs are constructed independently (not via nix.vX_Y.pkgs) - # to avoid infinite recursion with the splice infrastructure. + # Backwards-compatible nixVersions scope. The nix_2_* aliases come from the + # mkManyVariants nix package; the nixComponents_* scopes are pulled from each + # variant's passthru.pkgs (the spliced component scope built in generic.nix). nixVersions = let - addTestsShallowly = - tests: pkg: + addFallbackPathsCheck = + pkg: pkg // { - tests = pkg.tests // tests; - passthru.tests = pkg.tests // tests; + tests = pkg.tests // { + nix-fallback-paths = + runCommand "test-nix-fallback-paths-version-equals-nix-stable" + { + paths = lib.concatStringsSep "\n" ( + builtins.attrValues (import ./nixos/modules/installer/tools/nix-fallback-paths.nix) + ); + } + '' + if [[ "" != $(grep -vE 'nix-([^-]*-)*${ + lib.strings.replaceStrings [ "." ] [ "\\." ] pkg.version + }$' <<< "$paths") ]]; then + echo "nix-fallback-paths not up to date with nixVersions.stable (nix-${pkg.version})" + echo "The following paths are not up to date:" + grep -v 'nix-${pkg.version}$' <<< "$paths" + echo + echo "Fix it by running:" + echo + echo "curl https://releases.nixos.org/nix/nix-${pkg.version}/fallback-paths.nix >nixos/modules/installer/tools/nix-fallback-paths.nix" + echo + exit 1 + else + echo "nix-fallback-paths versions up to date" + touch $out + fi + ''; + }; }; - addFallbackPathsCheck = - pkg: - addTestsShallowly { - nix-fallback-paths = - runCommand "test-nix-fallback-paths-version-equals-nix-stable" - { - paths = lib.concatStringsSep "\n" ( - builtins.attrValues (import ./nixos/modules/installer/tools/nix-fallback-paths.nix) - ); - } - '' - if [[ "" != $(grep -vE 'nix-([^-]*-)*${ - lib.strings.replaceStrings [ "." ] [ "\\." ] pkg.version - }$' <<< "$paths") ]]; then - echo "nix-fallback-paths not up to date with nixVersions.stable (nix-${pkg.version})" - echo "The following paths are not up to date:" - grep -v 'nix-${pkg.version}$' <<< "$paths" - echo - echo "Fix it by running:" - echo - echo "curl https://releases.nixos.org/nix/nix-${pkg.version}/fallback-paths.nix >nixos/modules/installer/tools/nix-fallback-paths.nix" - echo - exit 1 - else - echo "nix-fallback-paths versions up to date" - touch $out - fi - ''; - } pkg; - - # Nix >= 2.33 requires boost >= 1.87 - nixDependencies187 = nixDependencies.overrideScope ( - final: prev: { - boost = pkgs.boost.v1_87; - } - ); - # Independently construct nixComponents scopes for splicing. - # These must NOT go through nix.vX_Y.pkgs to avoid splice cycles. - mkNixComponents = - { - version, - src, - deps, - attrName, - }: - deps.callPackage ./pkgs-many/nix/modular/packages.nix { - inherit version src; - nixDependencies = deps; - otherSplices = generateSplicesForMkScope [ - "nixVersions" - attrName - ]; - }; + # Collect nixComponents scopes from each modular variant's passthru.pkgs. + # v2_28 is monolithic (no component scope), so it's excluded. + modularVariants = lib.filterAttrs (name: _: lib.hasPrefix "v2_" name && name != "v2_28") ( + import ./pkgs-many/nix/variants.nix + ); - nixComponentsArgs = { - nixComponents_2_29 = { - version = "2.29.4"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.29.4"; - hash = "sha256-eVELGOeQg37AZLu7xnsaW9VA4fBr3x1d97I0iAoIt8A="; - }; - deps = nixDependencies; - attrName = "nixComponents_2_29"; - }; - nixComponents_2_30 = { - version = "2.30.5"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.30.5"; - hash = "sha256-tGiV71RxtCNcUNX86ZwmOIghG4pLwm5nlRKd89er7Gk="; - }; - deps = nixDependencies; - attrName = "nixComponents_2_30"; - }; - nixComponents_2_31 = { - version = "2.31.5"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.31.5"; - hash = "sha256-b7fhCXxl9qKTNPQvG8T/+nOxB95kalt9/aSY+ZSRctk="; - }; - deps = nixDependencies; - attrName = "nixComponents_2_31"; - }; - nixComponents_2_32 = { - version = "2.32.8"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.32.8"; - hash = "sha256-vj5o3dP9QaiW025a5INgg9j9XwScFsCYr6WrBxqSvUk="; - }; - deps = nixDependencies; - attrName = "nixComponents_2_32"; - }; - nixComponents_2_33 = { - version = "2.33.6"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.33.6"; - hash = "sha256-I3A0vFSFg3iI8tGBuQlAy7DzcxYcG39b06rfKOzGRvc="; - }; - deps = nixDependencies187; - attrName = "nixComponents_2_33"; - }; - nixComponents_2_34 = { - version = "2.34.8"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.34.8"; - hash = "sha256-Rvy1PmIUMGI0IS/kwDwmf/VrorU8v1iZYejssSVu1rY="; - }; - deps = nixDependencies187; - attrName = "nixComponents_2_34"; - }; - nixComponents_2_35 = { - version = "2.35.2"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - tag = "2.35.2"; - hash = "sha256-C/YEm/5IPiAMxQH5aHlkwgQMkLqK7NVsudEWdlzBZAA="; - }; - deps = nixDependencies187; - attrName = "nixComponents_2_35"; - }; - nixComponents_git = { - version = "2.36pre20260825_3aef07e8"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - rev = "3aef07e8fe2dc4b226515ecd536b3002c93577c7"; - hash = "sha256-78tbhNekla4TxDb1FEzt6kPybcoueszGFpjqC1CuLBU="; - }; - deps = nixDependencies187; - attrName = "nixComponents_git"; + nixComponentsFromVariants = + lib.mapAttrs' ( + name: _: + let + componentsName = "nixComponents_${lib.removePrefix "v" name}"; + in + lib.nameValuePair componentsName nix.${name}.pkgs + ) modularVariants + // { + nixComponents_git = nix.git.pkgs; }; - }; in lib.recurseIntoAttrs ( { @@ -1415,7 +1313,7 @@ final: prev: with final; { latest = nix.v2_35; stable = addFallbackPathsCheck nix; } - // builtins.mapAttrs (_name: args: mkNixComponents args) nixComponentsArgs + // nixComponentsFromVariants ); ensureNewerSourcesHook =