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!

+3 -3
doc/languages-frameworks/dotnet.section.md
···
nugetSha256 = "sha256-ZG2HFyKYhVNVYd2kRlkbAjZJq88OADe3yjxmLuxXDUo=";
-
meta = with lib; {
homepage = "https://cmd.petabridge.com/index.html";
changelog = "https://cmd.petabridge.com/articles/RELEASE_NOTES.html";
-
license = licenses.unfree;
-
platforms = platforms.linux;
};
}
```
···
nugetSha256 = "sha256-ZG2HFyKYhVNVYd2kRlkbAjZJq88OADe3yjxmLuxXDUo=";
+
meta = {
homepage = "https://cmd.petabridge.com/index.html";
changelog = "https://cmd.petabridge.com/articles/RELEASE_NOTES.html";
+
license = lib.licenses.unfree;
+
platforms = lib.platforms.linux;
};
}
```
+3 -3
doc/languages-frameworks/go.section.md
···
vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
-
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
-
license = licenses.mit;
-
maintainers = with maintainers; [ kalbasit ];
};
}
```
···
vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
+
meta = {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
+
license = lib.licenses.mit;
+
maintainers = with lib.maintainers; [ kalbasit ];
};
}
```
+3 -3
doc/languages-frameworks/idris.section.md
···
hash = "sha256-h28F9EEPuvab6zrfeE+0k1XGQJGwINnsJEG8yjWIl7w=";
};
-
meta = with lib; {
description = "Idris YAML lib";
homepage = "https://github.com/Heather/Idris.Yaml";
-
license = licenses.mit;
-
maintainers = [ maintainers.brainrape ];
};
}
```
···
hash = "sha256-h28F9EEPuvab6zrfeE+0k1XGQJGwINnsJEG8yjWIl7w=";
};
+
meta = {
description = "Idris YAML lib";
homepage = "https://github.com/Heather/Idris.Yaml";
+
license = lib.licenses.mit;
+
maintainers = [ lib.maintainers.brainrape ];
};
}
```
+3 -3
doc/languages-frameworks/javascript.section.md
···
NODE_OPTIONS = "--openssl-legacy-provider";
-
meta = with lib; {
description = "A modern web UI for various torrent clients with a Node.js backend and React frontend";
homepage = "https://flood.js.org";
-
license = licenses.gpl3Only;
-
maintainers = with maintainers; [ winter ];
};
}
```
···
NODE_OPTIONS = "--openssl-legacy-provider";
+
meta = {
description = "A modern web UI for various torrent clients with a Node.js backend and React frontend";
homepage = "https://flood.js.org";
+
license = lib.licenses.gpl3Only;
+
maintainers = with lib.maintainers; [ winter ];
};
}
```
+2 -2
doc/languages-frameworks/lua.section.md
···
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
propagatedBuildInputs = [ bit32 lua std_normalize ];
-
meta = with lib; {
homepage = "https://github.com/luaposix/luaposix/";
description = "Lua bindings for POSIX";
-
maintainers = with maintainers; [ vyp lblasc ];
license.fullName = "MIT/X11";
};
};
···
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
propagatedBuildInputs = [ bit32 lua std_normalize ];
+
meta = {
homepage = "https://github.com/luaposix/luaposix/";
description = "Lua bindings for POSIX";
+
maintainers = with lib.maintainers; [ vyp lblasc ];
license.fullName = "MIT/X11";
};
};
+3 -3
doc/languages-frameworks/maven.section.md
···
--add-flags "-jar $out/share/jd-cli/jd-cli.jar"
'';
-
meta = with lib; {
description = "Simple command line wrapper around JD Core Java Decompiler project";
homepage = "https://github.com/intoolswetrust/jd-cli";
-
license = licenses.gpl3Plus;
-
maintainers = with maintainers; [ majiir ];
};
}:
```
···
--add-flags "-jar $out/share/jd-cli/jd-cli.jar"
'';
+
meta = {
description = "Simple command line wrapper around JD Core Java Decompiler project";
homepage = "https://github.com/intoolswetrust/jd-cli";
+
license = lib.licenses.gpl3Plus;
+
maintainers = with lib.maintainers; [ majiir ];
};
}:
```
+3 -3
doc/languages-frameworks/ocaml.section.md
···
hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc=";
};
-
meta = with lib; {
homepage = "https://github.com/flowtype/ocaml-wtf8";
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
-
license = licenses.mit;
-
maintainers = [ maintainers.eqyiel ];
};
}
```
···
hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc=";
};
+
meta = {
homepage = "https://github.com/flowtype/ocaml-wtf8";
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
+
license = lib.licenses.mit;
+
maintainers = [ lib.maintainers.eqyiel ];
};
}
```
+19 -19
doc/languages-frameworks/python.section.md
···
hypothesis
];
-
meta = with lib; {
changelog = "https://github.com/pytest-dev/pytest/releases/tag/${version}";
description = "Framework for writing tests";
homepage = "https://github.com/pytest-dev/pytest";
-
license = licenses.mit;
-
maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
};
}
```
···
python-daemon
];
-
meta = with lib; {
# ...
};
}
···
"toolz.dicttoolz"
];
-
meta = with lib; {
changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}";
homepage = "https://github.com/pytoolz/toolz";
description = "List processing tools and functional utilities";
-
license = licenses.bsd3;
-
maintainers = with maintainers; [ fridh ];
};
}
```
···
pytest
];
-
meta = with lib; {
changelog = "https://github.com/blaze/datashape/releases/tag/${version}";
homepage = "https://github.com/ContinuumIO/datashape";
description = "A data description language";
-
license = licenses.bsd2;
-
maintainers = with maintainers; [ fridh ];
};
}
```
···
libxslt
];
-
meta = with lib; {
changelog = "https://github.com/lxml/lxml/releases/tag/lxml-${version}";
description = "Pythonic binding for the libxml2 and libxslt libraries";
homepage = "https://lxml.de";
-
license = licenses.bsd3;
-
maintainers = with maintainers; [ sjourdois ];
};
}
```
···
# Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false;
-
meta = with lib; {
changelog = "https://github.com/pyFFTW/pyFFTW/releases/tag/v${version}";
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = "http://hgomersall.github.com/pyFFTW";
-
license = with licenses; [ bsd2 bsd3 ];
-
maintainers = with maintainers; [ fridh ];
};
}
```
···
wheel
];
-
meta = with lib; {
changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}";
homepage = "https://github.com/pytoolz/toolz/";
description = "List processing tools and functional utilities";
-
license = licenses.bsd3;
-
maintainers = with maintainers; [ fridh ];
};
}
```
···
hypothesis
];
+
meta = {
changelog = "https://github.com/pytest-dev/pytest/releases/tag/${version}";
description = "Framework for writing tests";
homepage = "https://github.com/pytest-dev/pytest";
+
license = lib.licenses.mit;
+
maintainers = with lib.maintainers; [ domenkozar lovek323 madjar lsix ];
};
}
```
···
python-daemon
];
+
meta = {
# ...
};
}
···
"toolz.dicttoolz"
];
+
meta = {
changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}";
homepage = "https://github.com/pytoolz/toolz";
description = "List processing tools and functional utilities";
+
license = lib.licenses.bsd3;
+
maintainers = with lib.maintainers; [ fridh ];
};
}
```
···
pytest
];
+
meta = {
changelog = "https://github.com/blaze/datashape/releases/tag/${version}";
homepage = "https://github.com/ContinuumIO/datashape";
description = "A data description language";
+
license = lib.licenses.bsd2;
+
maintainers = with lib.maintainers; [ fridh ];
};
}
```
···
libxslt
];
+
meta = {
changelog = "https://github.com/lxml/lxml/releases/tag/lxml-${version}";
description = "Pythonic binding for the libxml2 and libxslt libraries";
homepage = "https://lxml.de";
+
license = lib.licenses.bsd3;
+
maintainers = with lib.maintainers; [ sjourdois ];
};
}
```
···
# Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false;
+
meta = {
changelog = "https://github.com/pyFFTW/pyFFTW/releases/tag/v${version}";
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = "http://hgomersall.github.com/pyFFTW";
+
license = with lib.licenses; [ bsd2 bsd3 ];
+
maintainers = with lib.maintainers; [ fridh ];
};
}
```
···
wheel
];
+
meta = {
changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}";
homepage = "https://github.com/pytoolz/toolz/";
description = "List processing tools and functional utilities";
+
license = lib.licenses.bsd3;
+
maintainers = with lib.maintainers; [ fridh ];
};
}
```
+5 -5
doc/languages-frameworks/rust.section.md
···
cargoHash = "sha256-jtBw4ahSl88L0iuCXxQgZVm1EcboWRJMNtjxLVTtzts=";
-
meta = with lib; {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
-
license = licenses.unlicense;
maintainers = [];
};
}
···
doCheck = false;
-
meta = with lib; {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
-
license = with licenses; [ mit unlicense ];
-
maintainers = with maintainers; [];
};
}
```
···
cargoHash = "sha256-jtBw4ahSl88L0iuCXxQgZVm1EcboWRJMNtjxLVTtzts=";
+
meta = {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
+
license = lib.licenses.unlicense;
maintainers = [];
};
}
···
doCheck = false;
+
meta = {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
+
license = with lib.licenses; [ mit unlicense ];
+
maintainers = with lib.maintainers; [];
};
}
```
+4 -4
doc/languages-frameworks/texlive.section.md
···
runHook postInstall
'';
-
meta = with lib; {
description = "A LaTeX2e class for overhead transparencies";
-
license = licenses.unfreeRedistributable;
-
maintainers = with maintainers; [ veprbl ];
-
platforms = platforms.all;
};
};
···
runHook postInstall
'';
+
meta = {
description = "A LaTeX2e class for overhead transparencies";
+
license = lib.licenses.unfreeRedistributable;
+
maintainers = with lib.maintainers; [ veprbl ];
+
platforms = lib.platforms.all;
};
};
+4 -4
doc/stdenv/meta.chapter.md
···
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:
```nix
-
meta = with lib; {
description = "A program that produces a familiar, friendly greeting";
longDescription = ''
GNU Hello is a program that prints "Hello, world!" when you run it.
It is fully customizable.
'';
homepage = "https://www.gnu.org/software/hello/manual/";
-
license = licenses.gpl3Plus;
-
maintainers = with maintainers; [ eelco ];
-
platforms = platforms.all;
};
```
···
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:
```nix
+
meta = {
description = "A program that produces a familiar, friendly greeting";
longDescription = ''
GNU Hello is a program that prints "Hello, world!" when you run it.
It is fully customizable.
'';
homepage = "https://www.gnu.org/software/hello/manual/";
+
license = lib.licenses.gpl3Plus;
+
maintainers = with lib.maintainers; [ eelco ];
+
platforms = lib.platforms.all;
};
```