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!

+52 -52
+3 -3
doc/languages-frameworks/dotnet.section.md
··· 210 210 211 211 nugetSha256 = "sha256-ZG2HFyKYhVNVYd2kRlkbAjZJq88OADe3yjxmLuxXDUo="; 212 212 213 - meta = with lib; { 213 + meta = { 214 214 homepage = "https://cmd.petabridge.com/index.html"; 215 215 changelog = "https://cmd.petabridge.com/articles/RELEASE_NOTES.html"; 216 - license = licenses.unfree; 217 - platforms = platforms.linux; 216 + license = lib.licenses.unfree; 217 + platforms = lib.platforms.linux; 218 218 }; 219 219 } 220 220 ```
+3 -3
doc/languages-frameworks/go.section.md
··· 51 51 52 52 vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA="; 53 53 54 - meta = with lib; { 54 + meta = { 55 55 description = "Simple command-line snippet manager, written in Go"; 56 56 homepage = "https://github.com/knqyf263/pet"; 57 - license = licenses.mit; 58 - maintainers = with maintainers; [ kalbasit ]; 57 + license = lib.licenses.mit; 58 + maintainers = with lib.maintainers; [ kalbasit ]; 59 59 }; 60 60 } 61 61 ```
+3 -3
doc/languages-frameworks/idris.section.md
··· 93 93 hash = "sha256-h28F9EEPuvab6zrfeE+0k1XGQJGwINnsJEG8yjWIl7w="; 94 94 }; 95 95 96 - meta = with lib; { 96 + meta = { 97 97 description = "Idris YAML lib"; 98 98 homepage = "https://github.com/Heather/Idris.Yaml"; 99 - license = licenses.mit; 100 - maintainers = [ maintainers.brainrape ]; 99 + license = lib.licenses.mit; 100 + maintainers = [ lib.maintainers.brainrape ]; 101 101 }; 102 102 } 103 103 ```
+3 -3
doc/languages-frameworks/javascript.section.md
··· 184 184 185 185 NODE_OPTIONS = "--openssl-legacy-provider"; 186 186 187 - meta = with lib; { 187 + meta = { 188 188 description = "A modern web UI for various torrent clients with a Node.js backend and React frontend"; 189 189 homepage = "https://flood.js.org"; 190 - license = licenses.gpl3Only; 191 - maintainers = with maintainers; [ winter ]; 190 + license = lib.licenses.gpl3Only; 191 + maintainers = with lib.maintainers; [ winter ]; 192 192 }; 193 193 } 194 194 ```
+2 -2
doc/languages-frameworks/lua.section.md
··· 193 193 disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); 194 194 propagatedBuildInputs = [ bit32 lua std_normalize ]; 195 195 196 - meta = with lib; { 196 + meta = { 197 197 homepage = "https://github.com/luaposix/luaposix/"; 198 198 description = "Lua bindings for POSIX"; 199 - maintainers = with maintainers; [ vyp lblasc ]; 199 + maintainers = with lib.maintainers; [ vyp lblasc ]; 200 200 license.fullName = "MIT/X11"; 201 201 }; 202 202 };
+3 -3
doc/languages-frameworks/maven.section.md
··· 34 34 --add-flags "-jar $out/share/jd-cli/jd-cli.jar" 35 35 ''; 36 36 37 - meta = with lib; { 37 + meta = { 38 38 description = "Simple command line wrapper around JD Core Java Decompiler project"; 39 39 homepage = "https://github.com/intoolswetrust/jd-cli"; 40 - license = licenses.gpl3Plus; 41 - maintainers = with maintainers; [ majiir ]; 40 + license = lib.licenses.gpl3Plus; 41 + maintainers = with lib.maintainers; [ majiir ]; 42 42 }; 43 43 }: 44 44 ```
+3 -3
doc/languages-frameworks/ocaml.section.md
··· 110 110 hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc="; 111 111 }; 112 112 113 - meta = with lib; { 113 + meta = { 114 114 homepage = "https://github.com/flowtype/ocaml-wtf8"; 115 115 description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates."; 116 - license = licenses.mit; 117 - maintainers = [ maintainers.eqyiel ]; 116 + license = lib.licenses.mit; 117 + maintainers = [ lib.maintainers.eqyiel ]; 118 118 }; 119 119 } 120 120 ```
+19 -19
doc/languages-frameworks/python.section.md
··· 130 130 hypothesis 131 131 ]; 132 132 133 - meta = with lib; { 133 + meta = { 134 134 changelog = "https://github.com/pytest-dev/pytest/releases/tag/${version}"; 135 135 description = "Framework for writing tests"; 136 136 homepage = "https://github.com/pytest-dev/pytest"; 137 - license = licenses.mit; 138 - maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ]; 137 + license = lib.licenses.mit; 138 + maintainers = with lib.maintainers; [ domenkozar lovek323 madjar lsix ]; 139 139 }; 140 140 } 141 141 ``` ··· 312 312 python-daemon 313 313 ]; 314 314 315 - meta = with lib; { 315 + meta = { 316 316 # ... 317 317 }; 318 318 } ··· 899 899 "toolz.dicttoolz" 900 900 ]; 901 901 902 - meta = with lib; { 902 + meta = { 903 903 changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}"; 904 904 homepage = "https://github.com/pytoolz/toolz"; 905 905 description = "List processing tools and functional utilities"; 906 - license = licenses.bsd3; 907 - maintainers = with maintainers; [ fridh ]; 906 + license = lib.licenses.bsd3; 907 + maintainers = with lib.maintainers; [ fridh ]; 908 908 }; 909 909 } 910 910 ``` ··· 1034 1034 pytest 1035 1035 ]; 1036 1036 1037 - meta = with lib; { 1037 + meta = { 1038 1038 changelog = "https://github.com/blaze/datashape/releases/tag/${version}"; 1039 1039 homepage = "https://github.com/ContinuumIO/datashape"; 1040 1040 description = "A data description language"; 1041 - license = licenses.bsd2; 1042 - maintainers = with maintainers; [ fridh ]; 1041 + license = lib.licenses.bsd2; 1042 + maintainers = with lib.maintainers; [ fridh ]; 1043 1043 }; 1044 1044 } 1045 1045 ``` ··· 1084 1084 libxslt 1085 1085 ]; 1086 1086 1087 - meta = with lib; { 1087 + meta = { 1088 1088 changelog = "https://github.com/lxml/lxml/releases/tag/lxml-${version}"; 1089 1089 description = "Pythonic binding for the libxml2 and libxslt libraries"; 1090 1090 homepage = "https://lxml.de"; 1091 - license = licenses.bsd3; 1092 - maintainers = with maintainers; [ sjourdois ]; 1091 + license = lib.licenses.bsd3; 1092 + maintainers = with lib.maintainers; [ sjourdois ]; 1093 1093 }; 1094 1094 } 1095 1095 ``` ··· 1155 1155 # Tests cannot import pyfftw. pyfftw works fine though. 1156 1156 doCheck = false; 1157 1157 1158 - meta = with lib; { 1158 + meta = { 1159 1159 changelog = "https://github.com/pyFFTW/pyFFTW/releases/tag/v${version}"; 1160 1160 description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; 1161 1161 homepage = "http://hgomersall.github.com/pyFFTW"; 1162 - license = with licenses; [ bsd2 bsd3 ]; 1163 - maintainers = with maintainers; [ fridh ]; 1162 + license = with lib.licenses; [ bsd2 bsd3 ]; 1163 + maintainers = with lib.maintainers; [ fridh ]; 1164 1164 }; 1165 1165 } 1166 1166 ``` ··· 1530 1530 wheel 1531 1531 ]; 1532 1532 1533 - meta = with lib; { 1533 + meta = { 1534 1534 changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}"; 1535 1535 homepage = "https://github.com/pytoolz/toolz/"; 1536 1536 description = "List processing tools and functional utilities"; 1537 - license = licenses.bsd3; 1538 - maintainers = with maintainers; [ fridh ]; 1537 + license = lib.licenses.bsd3; 1538 + maintainers = with lib.maintainers; [ fridh ]; 1539 1539 }; 1540 1540 } 1541 1541 ```
+5 -5
doc/languages-frameworks/rust.section.md
··· 35 35 36 36 cargoHash = "sha256-jtBw4ahSl88L0iuCXxQgZVm1EcboWRJMNtjxLVTtzts="; 37 37 38 - meta = with lib; { 38 + meta = { 39 39 description = "A fast line-oriented regex search tool, similar to ag and ack"; 40 40 homepage = "https://github.com/BurntSushi/ripgrep"; 41 - license = licenses.unlicense; 41 + license = lib.licenses.unlicense; 42 42 maintainers = []; 43 43 }; 44 44 } ··· 923 923 924 924 doCheck = false; 925 925 926 - meta = with lib; { 926 + meta = { 927 927 description = "A fast line-oriented regex search tool, similar to ag and ack"; 928 928 homepage = "https://github.com/BurntSushi/ripgrep"; 929 - license = with licenses; [ mit unlicense ]; 930 - maintainers = with maintainers; []; 929 + license = with lib.licenses; [ mit unlicense ]; 930 + maintainers = with lib.maintainers; []; 931 931 }; 932 932 } 933 933 ```
+4 -4
doc/languages-frameworks/texlive.section.md
··· 181 181 runHook postInstall 182 182 ''; 183 183 184 - meta = with lib; { 184 + meta = { 185 185 description = "A LaTeX2e class for overhead transparencies"; 186 - license = licenses.unfreeRedistributable; 187 - maintainers = with maintainers; [ veprbl ]; 188 - platforms = platforms.all; 186 + license = lib.licenses.unfreeRedistributable; 187 + maintainers = with lib.maintainers; [ veprbl ]; 188 + platforms = lib.platforms.all; 189 189 }; 190 190 }; 191 191
+4 -4
doc/stdenv/meta.chapter.md
··· 3 3 Nix packages can declare *meta-attributes* that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a `meta` declaration like this: 4 4 5 5 ```nix 6 - meta = with lib; { 6 + meta = { 7 7 description = "A program that produces a familiar, friendly greeting"; 8 8 longDescription = '' 9 9 GNU Hello is a program that prints "Hello, world!" when you run it. 10 10 It is fully customizable. 11 11 ''; 12 12 homepage = "https://www.gnu.org/software/hello/manual/"; 13 - license = licenses.gpl3Plus; 14 - maintainers = with maintainers; [ eelco ]; 15 - platforms = platforms.all; 13 + license = lib.licenses.gpl3Plus; 14 + maintainers = with lib.maintainers; [ eelco ]; 15 + platforms = lib.platforms.all; 16 16 }; 17 17 ``` 18 18