Skip to content

pkgs: remove optional builtins prefixes from prelude functions#447404

Merged
philiptaron merged 3 commits into
NixOS:masterfrom
trueNAHO:pkgs-remove-optional-builtins-prefixes-from-prelude-functions
Oct 4, 2025
Merged

pkgs: remove optional builtins prefixes from prelude functions#447404
philiptaron merged 3 commits into
NixOS:masterfrom
trueNAHO:pkgs-remove-optional-builtins-prefixes-from-prelude-functions

Conversation

@trueNAHO

@trueNAHO trueNAHO commented Sep 30, 2025

Copy link
Copy Markdown
Member
commit c8d4dabc4357a22d1c249a9363998bdb00122544
Author: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date:   2025-09-30 08:49:04 +0200

    pkgs: remove optional builtins prefixes from prelude functions

    Remove optional builtins prefixes from prelude functions by running:

        builtins=(
          abort
          baseNameOf
          break
          derivation
          derivationStrict
          dirOf
          false
          fetchGit
          fetchMercurial
          fetchTarball
          fetchTree
          fromTOML
          import
          isNull
          map
          null
          placeholder
          removeAttrs
          scopedImport
          throw
          toString
          true
        )

        fd \
          --type file \
          . \
          pkgs \
          --exec-batch sed --in-place --regexp-extended "
            s/\<builtins\.($(
              printf '%s\n' "${builtins[@]}" |
                paste --delimiter '|' --serial -
            ))\>/\1/g
          "

        nix fmt

 pkgs/applications/audio/mellowplayer/default.nix   |  2 +-
 pkgs/applications/audio/pianoteq/default.nix       |  2 +-
 pkgs/applications/audio/sonic-pi/update.sh         |  2 +-
 .../blockchains/bitcoin-knots/default.nix          |  2 +-
 pkgs/applications/blockchains/bitcoin/default.nix  |  2 +-
 .../emacs-application-framework/package.nix        |  6 ++--
 pkgs/applications/editors/emacs/make-emacs.nix     |  2 +-
 .../editors/jetbrains/plugins/tests.nix            |  2 +-
 .../editors/jetbrains/source/build.nix             |  2 +-
 .../editors/jupyter-kernels/clojupyter/deps.nix    |  2 +-
 .../kakoune/plugins/build-kakoune-plugin.nix       |  2 +-
 pkgs/applications/editors/neovim/utils.nix         |  2 +-
 pkgs/applications/editors/sublime/3/common.nix     |  2 +-
 pkgs/applications/editors/sublime/4/common.nix     |  2 +-
 .../vim/plugins/nvim-treesitter/overrides.nix      |  2 +-
 .../editors/vim/plugins/utils/vim-utils.nix        |  2 +-
 .../editors/vscode/extensions/updateSettings.nix   |  2 +-
 .../editors/vscode/extensions/vscode-utils.nix     |  2 +-
 .../graphics/sane/backends/default.nix             |  2 +-
 pkgs/applications/misc/sweethome3d/linux.nix       |  2 +-
 .../networking/browsers/chromium/common.nix        |  2 +-
 .../networking/browsers/firefox/wrapper.nix        | 10 +++---
 .../networking/cluster/k3s/builder.nix             |  4 +--
 .../networking/cluster/k3s/default.nix             |  2 +-
 .../networking/cluster/kops/default.nix            |  2 +-
 .../networking/cluster/nomad/default.nix           |  2 +-
 .../networking/cluster/rke2/default.nix            |  2 +-
 .../networking/cluster/terraform/default.nix       |  2 +-
 .../instant-messengers/franz/generic.nix           |  2 +-
 .../networking/irc/weechat/wrapper.nix             |  4 +--
 .../networking/mailreaders/mailnag/default.nix     |  2 +-
 .../networking/mailreaders/thunderbird/update.nix  |  2 +-
 .../office/libreoffice/darwin/default.nix          |  4 +--
 pkgs/applications/office/libreoffice/wrapper.nix   |  6 ++--
 pkgs/applications/radio/gnuradio/wrapper.nix       |  8 ++---
 .../science/chemistry/quantum-espresso/default.nix |  2 +-
 .../version-management/sublime-merge/common.nix    |  2 +-
 .../video/obs-studio/plugins/obs-gstreamer.nix     |  2 +-
 .../video/obs-studio/plugins/obs-vaapi/default.nix |  2 +-
 pkgs/applications/virtualization/cri-o/wrapper.nix |  2 +-
 pkgs/build-support/bintools-wrapper/default.nix    |  2 +-
 pkgs/build-support/buildenv/default.nix            |  2 +-
 pkgs/build-support/cc-wrapper/default.nix          |  2 +-
 pkgs/build-support/compress-drv/default.nix        |  2 +-
 pkgs/build-support/coq/meta-fetch/default.nix      |  2 +-
 .../dart/build-dart-application/default.nix        |  2 +-
 pkgs/build-support/docker/default.nix              |  8 ++---
 pkgs/build-support/docker/examples.nix             |  2 +-
 .../dotnet/add-nuget-deps/default.nix              |  2 +-
 .../dotnet/build-dotnet-package/default.nix        |  2 +-
 .../dotnet/make-nuget-deps/default.nix             |  2 +-
 pkgs/build-support/fetchdocker/default.nix         |  4 +--
 pkgs/build-support/fetchmavenartifact/default.nix  |  2 +-
 pkgs/build-support/fetchpatch/default.nix          |  6 ++--
 pkgs/build-support/fetchpypi/default.nix           |  4 +--
 pkgs/build-support/fetchs3/default.nix             |  2 +-
 pkgs/build-support/make-impure-test.nix            |  4 +--
 pkgs/build-support/mkshell/default.nix             |  2 +-
 pkgs/build-support/node/fetch-npm-deps/default.nix |  2 +-
 .../build-support/node/import-npm-lock/default.nix |  2 +-
 pkgs/build-support/ocaml/topkg.nix                 |  2 +-
 pkgs/build-support/release/source-tarball.nix      |  2 +-
 .../replace-vars/replace-vars-with.nix             |  2 +-
 .../rust/build-rust-crate/default.nix              |  2 +-
 .../rust/build-rust-crate/test/default.nix         |  6 ++--
 .../rust/build-rust-crate/test/rcgen-crates.nix    | 16 +++++-----
 pkgs/build-support/rust/fetch-cargo-vendor.nix     |  2 +-
 pkgs/build-support/rust/import-cargo-lock.nix      | 10 +++---
 .../arrayUtilities/isDeclaredArray/tests.nix       |  2 +-
 .../arrayUtilities/isDeclaredMap/tests.nix         |  2 +-
 pkgs/build-support/src-only/default.nix            |  4 +--
 pkgs/build-support/testers/default.nix             |  2 +-
 pkgs/build-support/trivial-builders/default.nix    |  8 ++---
 .../trivial-builders/test-overriding.nix           |  2 +-
 .../trivial-builders/test/concat-test.nix          |  2 +-
 .../test/writeShellApplication.nix                 |  2 +-
 pkgs/build-support/writers/scripts.nix             | 16 +++++-----
 pkgs/by-name/_1/_1password-cli/package.nix         |  2 +-
 pkgs/by-name/ab/aba/package.nix                    |  2 +-
 pkgs/by-name/al/alsa-lib-with-plugins/package.nix  |  4 +--
 .../by-name/am/amazon-cloudwatch-agent/package.nix |  2 +-
 pkgs/by-name/ap/apfsprogs/package.nix              |  2 +-
 pkgs/by-name/ap/aporetic/package.nix               |  2 +-
 .../ay/ayatana-indicator-messages/package.nix      |  2 +-
 pkgs/by-name/bo/bonsai/package.nix                 |  2 +-
 pkgs/by-name/ca/catppuccin-gtk/package.nix         |  4 +--
 pkgs/by-name/co/colloid-gtk-theme/package.nix      |  8 ++---
 pkgs/by-name/co/colloid-icon-theme/package.nix     |  4 +--
 pkgs/by-name/co/coredns/package.nix                |  4 +--
 pkgs/by-name/cp/cppitertools/package.nix           |  4 +--
 pkgs/by-name/cu/cups-brother-hll2350dw/package.nix |  2 +-
 pkgs/by-name/cu/cups-brother-hll2375dw/package.nix |  2 +-
 .../by-name/cu/cups-brother-mfcl2750dw/package.nix |  2 +-
 .../by-name/cu/cups-brother-mfcl2800dw/package.nix |  2 +-
 pkgs/by-name/cu/curl-impersonate/chrome/update.sh  |  2 +-
 pkgs/by-name/cu/curl-impersonate/firefox/update.sh |  2 +-
 pkgs/by-name/cy/cyrus-imapd/package.nix            |  2 +-
 pkgs/by-name/di/digiham/package.nix                |  2 +-
 pkgs/by-name/dm/dmd/generic.nix                    |  2 +-
 .../do/docker-credential-helpers/package.nix       |  4 +--
 pkgs/by-name/dr/dropbear/package.nix               |  2 +-
 pkgs/by-name/dv/dvdplusrwtools/package.nix         |  2 +-
 pkgs/by-name/ej/ejabberd/package.nix               |  2 +-
 pkgs/by-name/el/element-desktop/package.nix        |  2 +-
 pkgs/by-name/el/element-web-unwrapped/package.nix  |  2 +-
 pkgs/by-name/en/engage/package.nix                 |  4 +--
 pkgs/by-name/ep/epson-escpr2/package.nix           |  4 +--
 pkgs/by-name/eu/eurofurence/package.nix            |  2 +-
 pkgs/by-name/fc/fcft/package.nix                   |  4 +--
 pkgs/by-name/fi/fishnet/package.nix                |  2 +-
 pkgs/by-name/fl/fluent-bit/package.nix             |  2 +-
 pkgs/by-name/fl/fluent-gtk-theme/package.nix       |  8 ++---
 pkgs/by-name/fl/fluent-icon-theme/package.nix      |  2 +-
 pkgs/by-name/fr/freecad/freecad-utils.nix          |  4 +--
 pkgs/by-name/fr/freeswitch/package.nix             |  2 +-
 pkgs/by-name/ga/ganttproject-bin/package.nix       |  2 +-
 pkgs/by-name/ge/geoserver/package.nix              |  2 +-
 pkgs/by-name/ge/getxbook/package.nix               |  2 +-
 pkgs/by-name/gi/giflib/package.nix                 |  2 +-
 pkgs/by-name/gi/git-quick-stats/package.nix        |  2 +-
 pkgs/by-name/go/go-ethereum/package.nix            |  2 +-
 pkgs/by-name/go/google-cloud-sdk/components.nix    |  8 ++---
 .../go/google-cloud-sdk/withExtraComponents.nix    |  4 +--
 pkgs/by-name/gr/graphhopper/package.nix            |  2 +-
 pkgs/by-name/gr/graphite-gtk-theme/package.nix     | 10 +++---
 pkgs/by-name/gr/grcov/package.nix                  |  2 +-
 pkgs/by-name/gu/guile-gnutls/package.nix           |  6 ++--
 pkgs/by-name/ha/hare/cross-compilation-tests.nix   |  4 +--
 pkgs/by-name/ha/hare/package.nix                   |  2 +-
 pkgs/by-name/ha/harec/package.nix                  |  4 +--
 pkgs/by-name/ha/haredo/package.nix                 |  2 +-
 pkgs/by-name/hi/himitsu/package.nix                |  2 +-
 pkgs/by-name/hy/hylafaxplus/package.nix            |  4 +--
 pkgs/by-name/ib/ibm-plex/package.nix               |  2 +-
 pkgs/by-name/im/immich/package.nix                 |  2 +-
 pkgs/by-name/im/imv/package.nix                    |  4 +--
 pkgs/by-name/in/inspircd/package.nix               |  4 +--
 pkgs/by-name/in/intel-compute-runtime/package.nix  |  2 +-
 pkgs/by-name/io/iosevka-bin/package.nix            |  2 +-
 pkgs/by-name/is/isabelle/package.nix               |  2 +-
 pkgs/by-name/ja/jasper-gtk-theme/package.nix       |  8 ++---
 pkgs/by-name/ja/jazz2-content/package.nix          |  2 +-
 pkgs/by-name/ko/kodelife/update.sh                 |  2 +-
 .../by-name/ku/kubo-fs-repo-migrations/package.nix |  6 ++--
 pkgs/by-name/ld/ld-audit-search-mod/package.nix    |  2 +-
 pkgs/by-name/le/lemminx/package.nix                |  2 +-
 pkgs/by-name/li/libdynd/package.nix                |  2 +-
 pkgs/by-name/li/libpsl-with-scripts/package.nix    |  2 +-
 pkgs/by-name/ll/llama-swap/ui.nix                  |  2 +-
 .../lu/luarocks-packages-updater/package.nix       |  2 +-
 pkgs/by-name/ma/magma/package.nix                  |  2 +-
 pkgs/by-name/ma/matcha-gtk-theme/package.nix       |  4 +--
 pkgs/by-name/ma/maven/build-maven-package.nix      |  6 ++--
 pkgs/by-name/me/meson/package.nix                  |  2 +-
 pkgs/by-name/mf/mfcl5750dw/package.nix             |  2 +-
 pkgs/by-name/mi/mission-center/package.nix         |  2 +-
 pkgs/by-name/mi/mitm-cache/fetch.nix               |  4 +--
 pkgs/by-name/mo/mojave-gtk-theme/package.nix       | 12 +++-----
 pkgs/by-name/my/mylvmbackup/package.nix            |  4 +--
 pkgs/by-name/ne/nemo-with-extensions/package.nix   |  2 +-
 pkgs/by-name/ni/nim-unwrapped-1_0/package.nix      |  2 +-
 pkgs/by-name/ni/nim-unwrapped-2_0/package.nix      |  2 +-
 pkgs/by-name/ni/nix-required-mounts/package.nix    |  2 +-
 pkgs/by-name/ni/nixos-init/package.nix             |  2 +-
 pkgs/by-name/ol/ollama/package.nix                 |  2 +-
 pkgs/by-name/op/opa-envoy-plugin/package.nix       |  2 +-
 pkgs/by-name/op/open-policy-agent/package.nix      |  2 +-
 pkgs/by-name/op/openutau/update.sh                 |  2 +-
 pkgs/by-name/or/orchis-theme/package.nix           |  6 ++--
 pkgs/by-name/pi/pigpio/package.nix                 |  3 +-
 pkgs/by-name/pi/pihole/package.nix                 |  2 +-
 pkgs/by-name/pi/pixinsight/package.nix             |  2 +-
 pkgs/by-name/pl/plymouth/package.nix               |  2 +-
 pkgs/by-name/po/podman-desktop/package.nix         |  2 +-
 pkgs/by-name/pr/prek/package.nix                   |  2 +-
 pkgs/by-name/pr/prowlarr/update.py                 |  2 +-
 pkgs/by-name/pu/pulsar/package.nix                 |  2 +-
 pkgs/by-name/qo/qogir-icon-theme/package.nix       |  4 +--
 pkgs/by-name/qo/qogir-theme/package.nix            |  6 ++--
 pkgs/by-name/qr/qrq/package.nix                    |  2 +-
 pkgs/by-name/ra/racket/minimal.nix                 |  2 +-
 .../ra/racket/tests/get-version-and-variant.nix    |  2 +-
 pkgs/by-name/ra/radarr/update.py                   |  2 +-
 pkgs/by-name/re/reposilite/package.nix             |  2 +-
 pkgs/by-name/re/reversal-icon-theme/package.nix    |  2 +-
 pkgs/by-name/ru/rust-streamdeck/package.nix        |  2 +-
 pkgs/by-name/sh/shogihome/package.nix              |  2 +-
 pkgs/by-name/si/sierra-gtk-theme/package.nix       |  8 ++---
 pkgs/by-name/so/solana-cli/package.nix             |  2 +-
 pkgs/by-name/so/sonarlint-ls/package.nix           |  2 +-
 pkgs/by-name/so/sonarr/update.py                   |  2 +-
 pkgs/by-name/st/steam/package.nix                  |  2 +-
 pkgs/by-name/st/stockfish/package.nix              |  2 +-
 pkgs/by-name/st/streamdeck-ui/package.nix          |  2 +-
 pkgs/by-name/st/structurizr-cli/package.nix        |  2 +-
 pkgs/by-name/sw/swi-prolog/package.nix             |  4 +--
 pkgs/by-name/ta/tabby/package.nix                  |  2 +-
 pkgs/by-name/te/tela-circle-icon-theme/package.nix |  2 +-
 pkgs/by-name/to/touchosc/update.sh                 |  2 +-
 pkgs/by-name/tr/treecat/package.nix                |  2 +-
 pkgs/by-name/tr/treefmt/functions-doc.nix          |  2 +-
 pkgs/by-name/tr/treefmt/options-doc.nix            |  2 +-
 pkgs/by-name/tr/triton-llvm/package.nix            |  2 +-
 pkgs/by-name/uc/ucc/package.nix                    |  2 +-
 pkgs/by-name/uw/uwsgi/package.nix                  |  2 +-
 pkgs/by-name/va/vanillatd/package.nix              |  2 +-
 pkgs/by-name/vi/vimix-gtk-themes/package.nix       |  8 ++---
 pkgs/by-name/vi/vimix-icon-theme/package.nix       |  2 +-
 pkgs/by-name/wa/wasilibc/package.nix               |  6 ++--
 pkgs/by-name/wg/wgpu-native/examples.nix           |  2 +-
 pkgs/by-name/wh/whitesur-icon-theme/package.nix    |  2 +-
 pkgs/by-name/xe/xevd/package.nix                   |  6 ++--
 pkgs/by-name/xe/xeve/package.nix                   |  6 ++--
 pkgs/by-name/xg/xgboost/package.nix                |  2 +-
 pkgs/by-name/ya/yandex-cloud/update.py             |  2 +-
 pkgs/by-name/zx/zxtune/package.nix                 |  6 ++--
 pkgs/common-updater/combinators.nix                |  8 ++---
 pkgs/common-updater/unstable-updater.nix           |  2 +-
 pkgs/data/fonts/iosevka/comfy.nix                  |  2 +-
 .../gnome/extensions/buildGnomeExtension.nix       |  4 +--
 pkgs/desktops/gnome/update.nix                     |  2 +-
 .../applications/lomiri-calculator-app/default.nix |  2 +-
 .../lomiri-filemanager-app/default.nix             |  2 +-
 .../applications/lomiri-gallery-app/default.nix    |  2 +-
 .../lomiri-mediaplayer-app/default.nix             |  2 +-
 .../applications/lomiri-music-app/default.nix      |  2 +-
 .../lomiri-system-settings/default.nix             |  2 +-
 .../applications/lomiri-terminal-app/default.nix   |  2 +-
 .../services/lomiri-download-manager/default.nix   |  2 +-
 .../services/lomiri-indicator-network/default.nix  |  2 +-
 .../services/lomiri-polkit-agent/default.nix       |  2 +-
 .../services/lomiri-url-dispatcher/default.nix     |  2 +-
 .../lomiri/services/mediascanner2/default.nix      |  2 +-
 pkgs/development/ada-modules/gnatprove/default.nix |  2 +-
 pkgs/development/beam-modules/mix-release.nix      |  2 +-
 .../compilers/chicken/4/eggDerivation.nix          |  2 +-
 .../compilers/chicken/5/eggDerivation.nix          |  2 +-
 .../compilers/crystal/build-package.nix            |  2 +-
 .../compilers/gcc/ng/common/default.nix            |  5 ++-
 .../gcc/ng/common/libgfortran/default.nix          |  2 +-
 .../graalvm/community-edition/buildGraalvm.nix     |  2 +-
 .../community-edition/buildGraalvmProduct.nix      |  2 +-
 pkgs/development/compilers/idris2/build-idris.nix  |  2 +-
 pkgs/development/compilers/llvm/common/default.nix |  5 ++-
 .../compilers/llvm/common/llvm/default.nix         |  2 +-
 .../compilers/opensmalltalk-vm/default.nix         |  2 +-
 pkgs/development/compilers/rust/1_89.nix           |  2 +-
 pkgs/development/compilers/sbcl/default.nix        |  4 +--
 .../compilers/temurin-bin/jdk-darwin-base.nix      |  2 +-
 .../compilers/temurin-bin/jdk-linux-base.nix       |  2 +-
 pkgs/development/compilers/vala/default.nix        |  2 +-
 pkgs/development/compilers/zulu/11.nix             |  2 +-
 pkgs/development/compilers/zulu/17.nix             |  2 +-
 pkgs/development/compilers/zulu/21.nix             |  2 +-
 pkgs/development/compilers/zulu/23.nix             |  2 +-
 pkgs/development/compilers/zulu/24.nix             |  2 +-
 pkgs/development/compilers/zulu/25.nix             |  2 +-
 pkgs/development/compilers/zulu/8.nix              |  2 +-
 .../cuda-modules/cuda-library-samples/generic.nix  |  2 +-
 .../hare-third-party/hare-compress/default.nix     |  2 +-
 .../hare-third-party/hare-ev/default.nix           |  2 +-
 .../hare-third-party/hare-json/default.nix         |  2 +-
 .../hare-third-party/hare-png/default.nix          |  2 +-
 .../hare-third-party/hare-ssh/default.nix          |  2 +-
 .../hare-third-party/hare-toml/default.nix         |  2 +-
 .../haskell-modules/generic-builder.nix            |  6 ++--
 pkgs/development/haskell-modules/hoogle.nix        |  2 +-
 pkgs/development/haskell-modules/lib/compose.nix   |  4 +--
 .../haskell-modules/make-package-set.nix           |  4 +--
 .../haskell-modules/with-packages-wrapper.nix      |  2 +-
 .../idris-modules/build-idris-package.nix          |  2 +-
 pkgs/development/interpreters/clisp/default.nix    |  2 +-
 .../interpreters/elixir/generic-builder.nix        |  2 +-
 .../interpreters/octave/build-octave-package.nix   |  2 +-
 pkgs/development/interpreters/php/generic.nix      |  2 +-
 .../interpreters/python/conda/default.nix          |  2 +-
 .../interpreters/python/cpython/default.nix        |  2 +-
 .../python/python2/mk-python-derivation.nix        |  4 +--
 .../development/interpreters/ruby/ruby-version.nix |  2 +-
 .../interpreters/tcl/mk-tcl-derivation.nix         |  2 +-
 .../libraries/astal/buildAstalModule.nix           |  2 +-
 pkgs/development/libraries/glibc/locales.nix       |  2 +-
 .../libraries/gobject-introspection/wrapper.nix    |  4 +--
 pkgs/development/libraries/kerberos/krb5.nix       |  2 +-
 pkgs/development/libraries/libint/default.nix      | 36 +++++++++++-----------
 pkgs/development/libraries/mesa/default.nix        |  4 +--
 pkgs/development/libraries/openssl/default.nix     |  4 +--
 .../qt-6/modules/qtdeclarative/default.nix         |  4 +--
 pkgs/development/lua-modules/lib.nix               |  2 +-
 pkgs/development/misc/resholve/resholve-utils.nix  |  2 +-
 .../mobile/androidenv/compose-android-packages.nix |  8 ++---
 .../androidenv/examples/shell-with-emulator.nix    |  2 +-
 .../androidenv/examples/shell-without-emulator.nix |  2 +-
 .../mobile/androidenv/examples/shell.nix           |  2 +-
 pkgs/development/node-packages/overrides.nix       |  2 +-
 pkgs/development/ocaml-modules/atdgen/default.nix  |  2 +-
 .../ocaml-modules/ocaml-freestanding/default.nix   |  4 +--
 .../ocaml-modules/ocaml-gettext/camomile.nix       |  2 +-
 .../ocaml-modules/ocaml-gettext/stub.nix           |  2 +-
 pkgs/development/ocaml-modules/uucp/default.nix    |  2 +-
 pkgs/development/php-packages/relay/default.nix    |  5 +--
 pkgs/development/python-modules/faiss/default.nix  |  2 +-
 .../python-modules/fast-histogram/default.nix      |  2 +-
 .../python-modules/fontpens/default.nix            |  2 +-
 pkgs/development/python-modules/hy/default.nix     |  2 +-
 .../python-modules/invisible-watermark/default.nix |  2 +-
 .../python-modules/scikit-image/default.nix        |  2 +-
 .../python-modules/sentencepiece/default.nix       |  2 +-
 pkgs/development/python-modules/uv/default.nix     |  2 +-
 .../python-modules/warp-lang/default.nix           |  2 +-
 pkgs/development/rocm-modules/6/default.nix        |  2 +-
 pkgs/development/rocm-modules/6/llvm/default.nix   |  6 ++--
 pkgs/development/ruby-modules/gem/default.nix      |  2 +-
 .../development/tools/analysis/binlore/default.nix |  2 +-
 .../tools/build-managers/gradle/fetch-deps.nix     |  4 +--
 pkgs/development/tools/buildah/wrapper.nix         |  2 +-
 .../tools/haskell/ghc-settings-edit/default.nix    |  2 +-
 .../tools/ocaml/js_of_ocaml/default.nix            |  2 +-
 pkgs/development/tools/pnpm/fetch-deps/default.nix |  4 +--
 .../development/tools/yarn2nix-moretea/default.nix |  9 +++---
 .../yarn2nix-moretea/yarn2nix/lib/generateNix.js   |  6 ++--
 pkgs/games/anki/default.nix                        |  4 +--
 pkgs/games/anki/with-addons.nix                    |  2 +-
 pkgs/games/blightmud/default.nix                   |  2 +-
 .../dwarf-fortress/dwarf-therapist/wrapper.nix     |  2 +-
 pkgs/games/scummvm/games.nix                       |  2 +-
 pkgs/games/shattered-pixel-dungeon/generic.nix     |  2 +-
 pkgs/kde/lib/mk-kde-derivation.nix                 |  2 +-
 pkgs/misc/arm-trusted-firmware/default.nix         |  2 +-
 pkgs/misc/uboot/default.nix                        |  2 +-
 pkgs/os-specific/bsd/freebsd/lib/default.nix       |  4 +--
 .../bsd/freebsd/pkgs/drm-kmod-firmware.nix         |  2 +-
 .../bsd/freebsd/pkgs/drm-kmod/package.nix          |  2 +-
 pkgs/os-specific/bsd/freebsd/pkgs/install.nix      |  2 +-
 pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix |  2 +-
 pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix  |  8 ++---
 .../bsd/openbsd/pkgs/libcMinimal/package.nix       |  2 +-
 pkgs/os-specific/bsd/openbsd/pkgs/mkDerivation.nix |  2 +-
 pkgs/os-specific/linux/kernel/generic.nix          |  2 +-
 pkgs/os-specific/linux/kernel/mainline.nix         |  2 +-
 .../os-specific/linux/minimal-bootstrap/bash/2.nix |  2 +-
 .../linux/minimal-bootstrap/bash/default.nix       |  2 +-
 .../linux/minimal-bootstrap/gnumake/default.nix    |  2 +-
 .../linux/minimal-bootstrap/gnupatch/default.nix   |  2 +-
 .../linux/minimal-bootstrap/mes/default.nix        |  2 +-
 .../stage0-posix/bootstrap-sources.nix             |  2 +-
 .../stage0-posix/kaem/default.nix                  |  2 +-
 pkgs/os-specific/linux/minimal-bootstrap/utils.nix |  6 ++--
 pkgs/os-specific/linux/nvidia-x11/generic.nix      |  6 ++--
 pkgs/os-specific/linux/systemd/default.nix         |  6 +---
 .../build-custom-component/default.nix             |  2 +-
 pkgs/servers/http/openresty/default.nix            |  2 +-
 .../monitoring/grafana/plugins/grafana-plugin.nix  |  2 +-
 pkgs/servers/sql/postgresql/ext/omnigres.nix       |  4 +--
 pkgs/servers/web-apps/discourse/default.nix        |  2 +-
 pkgs/shells/fish/plugins/build-fish-plugin.nix     |  2 +-
 pkgs/stdenv/adapters.nix                           |  2 +-
 pkgs/stdenv/booter.nix                             |  2 +-
 pkgs/stdenv/cross/default.nix                      |  2 +-
 pkgs/stdenv/custom/default.nix                     |  2 +-
 pkgs/stdenv/darwin/bootstrap-tools.nix             |  4 +--
 pkgs/stdenv/darwin/default.nix                     |  4 +--
 pkgs/stdenv/darwin/test-bootstrap-tools.nix        |  2 +-
 pkgs/stdenv/freebsd/default.nix                    |  4 +--
 pkgs/stdenv/generic/check-meta.nix                 |  2 +-
 pkgs/stdenv/generic/make-derivation.nix            | 10 +++---
 pkgs/stdenv/linux/test-bootstrap-tools.nix         |  4 +--
 pkgs/test/auto-patchelf-hook/package.nix           |  4 +--
 .../test/make-hardcode-gsettings-patch/default.nix |  2 +-
 pkgs/test/texlive/default.nix                      |  2 +-
 pkgs/tools/misc/bat-extras/buildBatExtrasPkg.nix   |  2 +-
 pkgs/tools/networking/maubot/plugins/default.nix   |  2 +-
 pkgs/tools/networking/maubot/wrapper.nix           |  2 +-
 .../package-management/akku/akkuDerivation.nix     |  2 +-
 pkgs/tools/package-management/akku/default.nix     |  4 +--
 .../lix/revert-toml11-bump.patch                   |  6 ++--
 pkgs/tools/system/collectd/plugins.nix             |  4 +--
 pkgs/tools/system/nvtop/default.nix                |  4 +--
 pkgs/tools/typesetting/tex/texlive/bin.nix         |  4 +--
 .../typesetting/tex/texlive/combine-wrapper.nix    |  2 +-
 pkgs/tools/typesetting/tex/texlive/default.nix     |  6 ++--
 pkgs/top-level/all-packages.nix                    |  2 +-
 pkgs/top-level/config.nix                          |  2 +-
 pkgs/top-level/factor-packages.nix                 |  2 +-
 pkgs/top-level/impure.nix                          |  2 +-
 pkgs/top-level/php-packages.nix                    |  4 +--
 .../pkg-config/test-defaultPkgConfigPackages.nix   |  2 +-
 pkgs/top-level/release-haskell.nix                 |  2 +-
 pkgs/top-level/splice.nix                          |  4 +--
 pkgs/top-level/stage.nix                           |  2 +-
 390 files changed, 568 insertions(+), 597 deletions(-)

commit 3b97761aa798401b34908ed42d8f224ee80a1e84
Author: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date:   2025-09-30 20:35:50 +0200

    lixPackageSets.git: revert removal of builtins prefixes in patch

 pkgs/tools/package-management/lix/revert-toml11-bump.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 8052c76154ee922caff2532fe0e7e866be946e67
Author: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date:   2025-09-30 08:58:09 +0200

    pkgs: add builtins prefixes for prelude functions to improve clarity

 pkgs/build-support/src-only/default.nix             | 4 ++--
 pkgs/development/interpreters/ruby/ruby-version.nix | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Related PRs intentionally split up to simplify review and merging:

  1. doc: remove optional builtins prefixes from prelude functions #447401
  2. lib: remove optional builtins prefixes from prelude functions #447402
  3. pkgs: remove optional builtins prefixes from prelude functions #447404
  4. nixos: remove optional builtins prefixes from prelude functions #447403
  5. treewide: remove optional builtins prefixes from prelude functions #444432

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: kernel The Linux kernel 6.topic: emacs Text editor 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: vim Advanced text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 6.topic: stdenv Standard environment 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: TeX Issues regarding texlive and TeX in general 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: testing Tooling for automated testing of packages and modules 6.topic: updaters Tooling for (semi-)automated updating of packages 6.topic: cinnamon Desktop environment 6.topic: crystal Programming language - https://crystal-lang.org/ 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 6.topic: java Including JDK, tooling, other languages, other VMs 6.topic: cuda Parallel computing platform and API 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab labels Sep 30, 2025
@philiptaron

Copy link
Copy Markdown
Contributor

There are a couple minor regressions (not in this PR, in the tree) around changes that #301014 introduced.

Anything that uses ./. as src will get an unintentional rebuild with refactoring.

@trueNAHO trueNAHO force-pushed the pkgs-remove-optional-builtins-prefixes-from-prelude-functions branch from 8a20a1a to 07c0849 Compare September 30, 2025 19:11
@MattSturgeon

MattSturgeon commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

Anything that uses ./. as src will get an unintentional rebuild with refactoring.

Off topic, I know, but I thought we'd done treewides in the past to wrap such srcs with filterSource (or one of its abstractions)? (EDIT: I see you in fact linked to one of those!) I wonder if this is something we could enforce with nixpkgs-vet?

Also: did the issues with lib.fileset ever get resolved so that that can be used again in nixpkgs?

@trueNAHO

trueNAHO commented Sep 30, 2025

Copy link
Copy Markdown
Member Author

I went through the rebuilds -- there's one error, pkgs/tools/package-management/lix/revert-toml11-bump.patch, but other than that they're all OK.

Great catch! I reverted this in the new commit "lixPackageSets.git: revert removal of builtins prefixes in patch".

There are a couple minor regressions (not in this PR, in the tree) around changes that #301014 introduced.

Anything that uses ./. as src will get an unintentional rebuild with refactoring.

Should this PR target the staging branch instead of master then?

For reference, this PR is marked as draft according to #447402 (comment).

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Sep 30, 2025
@MattSturgeon

MattSturgeon commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

Should this PR target the staging branch instead of master then?

No, this PR had <100 rebuilds so master is fine (it now only has 4). It was just worth mentioning that what should be a no-op refactor had any rebuilds at all.

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 2, 2025
@philiptaron

Copy link
Copy Markdown
Contributor

I took a look at each file and rebuild. This is good to check in once the merge conflict (trivial) is resolved. I would resolve it myself but that would break @trueNAHO's commit signing.

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 3, 2025
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
@trueNAHO trueNAHO force-pushed the pkgs-remove-optional-builtins-prefixes-from-prelude-functions branch from 07c0849 to 8052c76 Compare October 4, 2025 17:06
@trueNAHO trueNAHO marked this pull request as ready for review October 4, 2025 17:08
@trueNAHO

trueNAHO commented Oct 4, 2025

Copy link
Copy Markdown
Member Author

I took a look at each file and rebuild.

Thanks :)

This is good to check in once the merge conflict (trivial) is resolved. I would resolve it myself but that would break @trueNAHO's commit signing.

Done.

@philiptaron philiptaron added this pull request to the merge queue Oct 4, 2025
@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 4, 2025
Merged via the queue into NixOS:master with commit 6d1d15b Oct 4, 2025
30 of 33 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Stdenv Oct 4, 2025
@github-project-automation github-project-automation Bot moved this from New to ✅ Done in CUDA Team Oct 4, 2025
trueNAHO added a commit to trueNAHO/nixpkgs that referenced this pull request Oct 6, 2025
Establish the builtins prefix convention for prelude attributes to
progress [1] ("Unwritten style guides should be written"), following the
treewide removal of the builtins prefix for prelude attributes [2] [3]
[4] [5] [6].

[1]: NixOS#387072
[2]: NixOS#444432
[3]: NixOS#447401
[4]: NixOS#447402
[5]: NixOS#447403
[6]: NixOS#447404
@MattSturgeon MattSturgeon mentioned this pull request Dec 21, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cinnamon Desktop environment 6.topic: crystal Programming language - https://crystal-lang.org/ 6.topic: cuda Parallel computing platform and API 6.topic: dotnet Language: .NET 6.topic: emacs Text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 6.topic: games Gaming on NixOS 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: java Including JDK, tooling, other languages, other VMs 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: k3s Kubernates distribution (https://k3s.io/) 6.topic: kernel The Linux kernel 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: nvidia Nvidia-specific issues and fixes 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: php PHP is a general-purpose scripting language geared towards web development. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: stdenv Standard environment 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 6.topic: tcl Dynamic, multi-paradigm programming language 6.topic: testing Tooling for automated testing of packages and modules 6.topic: TeX Issues regarding texlive and TeX in general 6.topic: updaters Tooling for (semi-)automated updating of packages 6.topic: vim Advanced text editor 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

Status: ✅ Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants