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
This commit is contained in:
NAHO
2025-10-04 19:02:37 +02:00
parent 0fe515d371
commit c8d4dabc43
390 changed files with 568 additions and 597 deletions
@@ -4,7 +4,7 @@
# List of libraries that are needed for conda binary packages.
# When installing a conda binary package, just extend
# the `buildInputs` with `condaAutopatchLibs`.
condaPatchelfLibs = builtins.map (p: p.lib or p) (
condaPatchelfLibs = map (p: p.lib or p) (
[
pkgs.alsa-lib
pkgs.cups
@@ -403,7 +403,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-kpXoIHlz53+0FAm/fK99ZBdNUg0u13erOr1XP2FSkQY=";
};
in
(builtins.map (f: "${mingw-patch}/${f}") [
(map (f: "${mingw-patch}/${f}") [
# The other patches in that repo are already applied to 3.11.10
"mingw-python3_distutils.patch"
"mingw-python3_frozenmain.patch"
@@ -171,12 +171,12 @@ let
checkDrv = drv: if (isPythonModule drv) && (isMismatchedPython drv) then throwMismatch drv else drv;
in
inputs: builtins.map (checkDrv) inputs;
inputs: map (checkDrv) inputs;
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
self = toPythonModule (
stdenv.mkDerivation (
(builtins.removeAttrs attrs [
(removeAttrs attrs [
"disabled"
"checkPhase"
"checkInputs"