Commit graph

10 commits

Author SHA1 Message Date
Philip Taron db45f2b770
lib: remove mapAttrsFlatten after a year
It was deprecated in b9c51260d0.
2025-10-13 08:55:22 -07:00
Johannes Kirschbauer bb9da33c62
lib/*: fix docs to use "returns" instead of "return" (#442388) 2025-10-06 08:09:54 +00:00
NAHO 6177c4ad72
lib: 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 . lib --exec-batch sed --in-place --regexp-extended "
      s/\<builtins\.($(
        printf '%s\n' "${builtins[@]}" |
          paste --delimiter '|' --serial -
      ))\>/\1/g
    "

    nix fmt
2025-09-30 09:02:59 +02:00
Felix Buehler 06ac3fbebd lib/*: fix docs to use "returns" instead of "return" 2025-09-12 16:16:41 +02:00
Wolfgang Walther 5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Wolfgang Walther b4532efe93
**/README.md: one sentence per line
As documented in doc/README.md.
2025-06-29 21:14:32 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Ivan Trubach b9c51260d0 lib/deprecated: print deprecation warning for mapAttrsFlatten 2024-07-24 13:23:16 +03:00
Ivan Trubach a13e0a12b7 lib/deprecated: alias mapAttrsFlatten to mapAttrsToList
These functions have identical implementation except for argument names.
2024-07-19 11:39:27 +03:00
Robert Hensing 33e02424d2 lib: Document status of deprecated.nix and move it
This is all I could find after co-maintaining lib for a long time.
I've had the fortune of basically not really noticing this file,
because it has had very few interactions until the confusion in
https://github.com/NixOS/nixpkgs/pull/304277

It seems to be a state of limbo, which would be nice to resolve
(with great care), but this is not urgent, and first we should
document its status.
2024-04-21 16:04:35 +02:00