treewide: Switch markdown placeholder from "..." to <...>
We use angle brackets since they look a lot like a placeholder while also being valid nix code, as suggested by roberth here: https://github.com/NixOS/nixpkgs/pull/299554#discussion_r1541797970
This commit is contained in:
parent
fcc95ff817
commit
bc5ee2b8f8
@ -557,7 +557,7 @@ Names of files and directories should be in lowercase, with dashes between words
|
|||||||
|
|
||||||
```nix
|
```nix
|
||||||
foo {
|
foo {
|
||||||
arg = "...";
|
arg = <...>;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -566,14 +566,14 @@ Names of files and directories should be in lowercase, with dashes between words
|
|||||||
```nix
|
```nix
|
||||||
foo
|
foo
|
||||||
{
|
{
|
||||||
arg = "...";
|
arg = <...>;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Also fine is
|
Also fine is
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
foo { arg = "..."; }
|
foo { arg = <...>; }
|
||||||
```
|
```
|
||||||
|
|
||||||
if it's a short call.
|
if it's a short call.
|
||||||
@ -683,19 +683,19 @@ Names of files and directories should be in lowercase, with dashes between words
|
|||||||
- Functions should list their expected arguments as precisely as possible. That is, write
|
- Functions should list their expected arguments as precisely as possible. That is, write
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, fetchurl, perl }: "..."
|
{ stdenv, fetchurl, perl }: <...>
|
||||||
```
|
```
|
||||||
|
|
||||||
instead of
|
instead of
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
args: with args; "..."
|
args: with args; <...>
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, fetchurl, perl, ... }: "..."
|
{ stdenv, fetchurl, perl, ... }: <...>
|
||||||
```
|
```
|
||||||
|
|
||||||
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
|
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
|
||||||
|
@ -123,7 +123,7 @@ Here is an example of `fetchDebianPatch` in action:
|
|||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pysimplesoap";
|
pname = "pysimplesoap";
|
||||||
version = "1.16.2";
|
version = "1.16.2";
|
||||||
src = "...";
|
src = <...>;
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
(fetchDebianPatch {
|
(fetchDebianPatch {
|
||||||
|
@ -194,7 +194,7 @@ mkDerivation {
|
|||||||
version = "1.5.0";
|
version = "1.5.0";
|
||||||
pname = "iowa-stdlib";
|
pname = "iowa-stdlib";
|
||||||
|
|
||||||
src = "...";
|
src = <...>;
|
||||||
|
|
||||||
libraryFile = "";
|
libraryFile = "";
|
||||||
libraryName = "IAL-1.3";
|
libraryName = "IAL-1.3";
|
||||||
|
@ -69,12 +69,12 @@ let
|
|||||||
chickenEggs = super.chickenEggs.overrideScope' (eggself: eggsuper: {
|
chickenEggs = super.chickenEggs.overrideScope' (eggself: eggsuper: {
|
||||||
srfi-180 = eggsuper.srfi-180.overrideAttrs {
|
srfi-180 = eggsuper.srfi-180.overrideAttrs {
|
||||||
# path to a local copy of srfi-180
|
# path to a local copy of srfi-180
|
||||||
src = "...";
|
src = <...>;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
# Here, `myChickenPackages.chickenEggs.json-rpc`, which depends on `srfi-180` will use
|
# Here, `myChickenPackages.chickenEggs.json-rpc`, which depends on `srfi-180` will use
|
||||||
# the local copy of `srfi-180`.
|
# the local copy of `srfi-180`.
|
||||||
"..."
|
<...>
|
||||||
```
|
```
|
||||||
|
@ -96,7 +96,7 @@ let
|
|||||||
something = (pkgs.something.override { jre = my_jre; });
|
something = (pkgs.something.override { jre = my_jre; });
|
||||||
other = (pkgs.other.override { jre = my_jre; });
|
other = (pkgs.other.override { jre = my_jre; });
|
||||||
in
|
in
|
||||||
"..."
|
<...>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also specify what JDK your JRE should be based on, for example
|
You can also specify what JDK your JRE should be based on, for example
|
||||||
|
@ -1890,7 +1890,7 @@ this snippet:
|
|||||||
{
|
{
|
||||||
myPythonPackages = python3Packages.override {
|
myPythonPackages = python3Packages.override {
|
||||||
overrides = self: super: {
|
overrides = self: super: {
|
||||||
twisted = "...";
|
twisted = <...>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user