nixpkgs/doc/languages-frameworks
Anderson Torres e671d3bbbd Nix docs: remove with lib; from example code
Following [Best Practices](https://nix.dev/guides/best-practices#with-scopes),
`with` is a problematic language construction and should be avoided.

Usually it is employed like a "factorization": `[ X.A X.B X.C X.D ]` is written
`with X; [ A B C D ]`.

However, as shown in the link above, the syntatical rules of `with` are not so
intuitive, and this "distributive rule" is very selective, in the sense that
`with X; [ A B C D ]` is not equivalent to `[ X.A X.B X.C X.D ]`.

However, this factorization is still useful to "squeeze" some code, especially
in lists like `meta.maintainers`.

On the other hand, it becomes less justifiable in bigger scopes. This is
especially true in cases like `with lib;` in the top of expression and in sets
like `meta = with lib; { . . . }`.

That being said, this patch removes most of example code in the current
documentation.

The exceptions are, for now
- doc/functions/generators.section.md
- doc/languages-frameworks/coq.section.md

because, well, they are way more complicated, and I couldn't parse them
mentally - yet another reason why `with` should be avoided!
2024-03-06 11:40:09 -03:00
..
agda.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
android.section.md androidenv: Implement cmdline-tools and patcher 2023-01-27 18:15:47 -05:00
beam.section.md Merge pull request #233587 from Munksgaard/fix-beam-modules-quotation-marks 2024-02-01 18:49:45 +00:00
bower.section.md Merge pull request #237068 from pennae/manual-normalization 2023-06-13 07:35:06 +02:00
chicken.section.md chickenPackages: turn into scope 2023-08-21 17:00:00 +02:00
coq.section.md Fix a small typo in the manual 2023-04-14 17:11:13 +01:00
crystal.section.md doc: use sri hash syntax 2022-12-04 06:12:18 +00:00
cuda.section.md cudaPackages: add docs 2023-12-07 16:45:56 +00:00
cuelang.section.md doc: assign ids to many headings 2023-03-27 22:39:11 +02:00
dart.section.md docs/dart: Update unstable version example 2024-01-29 00:06:18 +01:00
dhall.section.md fixup note on dhall-to-nixpkgs example 2023-11-02 17:38:03 +01:00
dotnet.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
emscripten.section.md stdenv: substituteStream: deprecate --replace in favor of --replace-{fail,warn,quiet} 2024-01-14 22:07:58 +01:00
gnome.section.md Merge pull request #237068 from pennae/manual-normalization 2023-06-13 07:35:06 +02:00
go.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
haskell.section.md doc/haskell: don't use lib.recursiveUpdate in overlays 2024-01-31 23:49:32 +01:00
hy.section.md doc: fix typos 2022-12-17 18:21:48 -05:00
idris.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
idris2.section.md doc: update idris2 documentation on buildIdris 2024-01-23 23:35:17 -06:00
index.md doc: idris2 section 2024-01-15 18:19:53 -06:00
ios.section.md doc: correct typos and spelling (#237098) 2023-06-11 02:15:43 +02:00
java.section.md jre_minimal: document how to use a headless JDK 2021-09-30 10:34:51 +02:00
javascript.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
julia.section.md julia docs: one line per sentence 2023-12-18 16:25:16 +01:00
lisp.section.md treewide: fix redirected and broken URLs 2023-11-11 10:49:01 +01:00
lua.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
maven.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
nim.section.md buildNimPackage: allow overriding nim package args 2023-12-10 09:10:02 +00:00
ocaml.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
octave.section.md doc: minimize mentions of nix-env -i without -A in nixpkgs manual 2021-12-18 12:00:00 +00:00
perl.section.md doc: update shortenPerlShebang example to use nativeBuildInputs 2023-05-10 18:34:17 +02:00
php.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
pkg-config.section.md doc: assign ids to many headings 2023-03-27 22:39:11 +02:00
python.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
qt.section.md doc/qt: minor fixes 2024-03-04 15:50:03 +08:00
r.section.md doc: clarify location of rPackages overrides 2021-09-26 07:29:58 +10:00
ruby.section.md docs/ruby: update/drop references to old version 2024-01-02 15:30:07 +01:00
rust.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
swift.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
texlive.section.md Nix docs: remove with lib; from example code 2024-03-06 11:40:09 -03:00
titanium.section.md doc: prepare for commonmark 2021-06-07 06:34:59 +02:00
vim.section.md vimPluginsUpdater: init 2023-10-01 17:30:55 +02:00