lol

Merge pull request #149667 from doronbehar/doc/pname-version-conventions

docs: Make coding conventions use pname/version

authored by

Doron Behar and committed by
GitHub
94eb0d16 7392416a

+5 -5
+5 -5
doc/contributing/coding-conventions.chapter.md
··· 214 214 215 215 There are a few naming guidelines: 216 216 217 - - The `name` attribute _should_ be identical to the upstream package name. 217 + - The `pname` attribute _should_ be identical to the upstream package name. 218 218 219 - - The `name` attribute _must not_ contain uppercase letters — e.g., `"mplayer-1.0rc2"` instead of `"MPlayer-1.0rc2"`. 219 + - The `pname` and the `version` attribute _must not_ contain uppercase letters — e.g., `"mplayer" instead of `"MPlayer"`. 220 220 221 - - The version part of the `name` attribute _must_ start with a digit (following a dash) — e.g., `"hello-0.3.1rc2"`. 221 + - The `version` attribute _must_ start with a digit e.g`"0.3.1rc2". 222 222 223 - - If a package is not a release but a commit from a repository, then the version part of the name _must_ be the date of that (fetched) commit. The date _must_ be in `"YYYY-MM-DD"` format. Also append `"unstable"` to the name - e.g., `"pkgname-unstable-2014-09-23"`. 223 + - If a package is not a release but a commit from a repository, then the `version` attribute _must_ be the date of that (fetched) commit. The date _must_ be in `"unstable-YYYY-MM-DD"` format. 224 224 225 - - Dashes in the package name _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names. 225 + - Dashes in the package `pname` _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names. 226 226 227 227 - If there are multiple versions of a package, this _should_ be reflected in the variable names in `all-packages.nix`, e.g. `json-c_0_9` and `json-c_0_11`. If there is an obvious “default” version, make an attribute like `json-c = json-c_0_9;`. See also [](#sec-versioning) 228 228