Commit Graph

38 Commits

Author SHA1 Message Date
Silvan Mosberger
1e1cd398d4 doc/coding-conventions: Rough move to new contribution doc files
No content was changed, new titles are wrapped with () to signal that
they will need to be decided on in a future commit.

Section in the manual have been preserved with a simple redirect to
GitHub, the proper anchors should be filled out in a future commit once
the new section names are decided.
2023-08-13 22:02:34 +02:00
Theodore Ni
9d55df7a37
docs/contributing: fix "ha256" -> "sha256" typo 2023-07-18 16:55:32 -07:00
Michael Raskin
5b90f7a6a9 coding-conventions: include the preceding upstream version when packaging a commit without a version attached 2023-06-02 13:27:25 +02:00
geri1701
8cbf65ece9
Fix typo in coding-conventions.chapter.md 2023-04-11 21:05:56 +02:00
Sandro Jäckel
fcfa4dd73b
doc/contributing: remove last references to name
pname+version should be used everywhere, so lets clean this up
2023-02-07 20:40:26 +01:00
Anderson Torres
593381845f doc/contributing/coding-conventions: add subsection for language servers 2022-12-25 10:57:29 -03:00
Valentin Gagarin
d9f9ead58a
Update doc/contributing/coding-conventions.chapter.md
Co-authored-by: Mostly Void <dit7ya@users.noreply.github.com>
2022-12-10 11:46:53 +01:00
Valentin Gagarin
db1a83aaa4 docs: fixup wording and formatting on JavaScript 2022-12-07 16:47:31 +01:00
Valentin Gagarin
53b5a47c12 document Import From Derivation (IFD) policy 2022-12-07 16:47:30 +01:00
Colin Arnott
bac379f30a
doc: use sri hash syntax
The nixpkgs manual contains references to both sri hash and explicit
sha256 attributes. This is at best confusing to new users. Since the
final destination is exclusive use of sri hashes, see nixos/rfcs#131,
might as well push new users in that direction gently.

Notable exceptions to sri hash support are builtins.fetchTarball,
cataclysm-dda, coq, dockerTools.pullimage, elixir.override, and
fetchCrate. None, other than builtins.fetchTarball, are fundamentally
incompatible, but all currently accept explicit sha256 attributes as
input. Because adding backwards compatibility is out of scope for this
change, they have been left intact, but migration to sri format has been
made for any using old hash formats.

All hashes have been manually tested to be accurate, and updates were
only made for missing upstream artefacts or bugs.
2022-12-04 06:12:18 +00:00
Ryan Mulligan
f3d0e1d5c3 nixpkgs/doc: fix admonition syntax
Match admonition syntax in

https://nixos.org/manual/nixpkgs/unstable/#chap-contributing
2022-11-08 07:30:20 -08:00
Adam Joseph
0d0c03fb0b
coding-conventions.chapter.md: update to account for #89885 (#191378)
https://github.com/NixOS/nixpkgs/pull/89885 ensures that fetches are
done securely (i.e. without `--insecure`) when the `hash` parameter is one of
the four special "fake" hashes.  However the manual was not updated in that PR.
This commit updates the manual to account for the already-merged changes from
that PR.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-12 11:08:50 +02:00
Sandro Jäckel
be09c1638d
doc/contributing: enforce full commit hashes on github 2022-09-04 00:50:35 +02:00
Matthias Bartelmeß
0ff5e21ea2
Correct instructions to obtain a hash for git repos 2022-08-04 00:31:31 +02:00
AndersonTorres
ba92e37183 doc/contributing/coding-conventions: add a section about file managers 2022-06-26 23:58:09 -03:00
Florian Klink
1cefcfab2d nixos/doc: move fetchpatch documentation to fetcher documentation
… and link from the coding-conventions chapter to it.

Closes #48569.
2022-06-03 14:37:31 +02:00
Doron Behar
94eb0d16a3
Merge pull request #149667 from doronbehar/doc/pname-version-conventions
docs: Make coding conventions use pname/version
2022-04-14 12:00:59 +03:00
Naïm Favier
bf7d13dc4f
fetchpatch: add relative
Allows restricting patches to a specific subdirectory, à la
`git diff --relative=subdir`.

This cannot be done (cleanly) currently because the `includes` logic
happens *after* `stripLen` is applied, so we can't match on `subdir/*`.

This change adds a `relative` argument that makes this possible by
filtering files before doing any processing, and setting `stripLen` and
`extraPrefix` accordingly.
2022-03-25 01:00:36 +01:00
Robert Hensing
daca830722 doc/coding-conventions: Fix version attribute suffix to match reality
The current doc is wildly out of touch with reality. A regex search shows
the following stats.

```
Style example  Frequency  Regex used
nix-2-5:            8     [a-zA-Z]-[0-9]+(-[0-9]+)+ =
nix-2_5:           17     [a-zA-Z]-[0-9]+(_[0-9]+)+ =
nix_2_5:          689     [a-zA-Z]_[0-9]+(_[0-9]+)+ =
nix_2-5:            1     [a-zA-Z]_[0-9]+(-[0-9]+)+ =
```
2022-01-26 14:40:20 +01:00
Doron Behar
01ec4349f2 docs: Make coding conventions use pname/version
Make it clear that we prefer using `pname` and `version` separated and
not the `name` attribute.
2021-12-08 18:40:01 +02:00
Sandro Jäckel
dded550fcd
doc: fix typo 2021-10-28 10:48:34 +02:00
Sandro
f289d93a41
doc/contributing: add lib.optional (#121251)
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2021-10-05 23:13:26 +02:00
Arnout Engelen
d09e0be1c4
nixpkgs-docs: when to prefer passthru.tests over installCheckPhase
And mention you can have either lightweight 'package' or
more heavyweight 'NixOS' (module) tests.

This was suggested at
https://github.com/ryantm/nixpkgs-update/issues/260#issuecomment-821287971
and discussed further at
https://github.com/NixOS/nixpkgs/pull/119731
2021-08-14 09:47:21 +02:00
davidak
2859cc8aa0
Merge pull request #130207 from hercules-ci/passthru-sensible-timeout
doc/coding-conventions: Increase passthru test timeout 3s -> 60s
2021-08-02 07:43:02 +02:00
Ryan Mulligan
9e55528940
Merge pull request #126001 from est31/master
Add the -a param to the docs
2021-07-28 12:00:47 -07:00
Niklas Hambüchen
fe5f3f65e2 manuals: Describe how to link NixOS tests from packages 2021-07-27 17:39:33 +02:00
Robert Hensing
840fd0a4f8 doc/coding-conventions: Increase passthru test timeout 3s -> 60s
3s is too small a margin for a loaded slow system to start a bloated
program.
This leads to problems when tests are written on decent dev hardware
but later run on build farms of potentially slower hardware,
particularly in the case of non x86.

The chance of needing the timeout is actually very small, so those
rare 57s are a reasonable price to pay for fewer timeouts on build
farms, each of which should be investigated and usually fixed by
increasing the timeout.
2021-07-14 19:03:58 +02:00
Jan Tojnar
3c78ad2561
doc: Use markdown syntax for xrefs
Syntax is taken from MyST:

https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing
2021-06-07 06:34:59 +02:00
Jan Tojnar
6ecc641d08
doc: prepare for commonmark
We are still using Pandoc’s Markdown parser, which differs from CommonMark spec slightly.

Notably:
- Line breaks in lists behave differently.
- Admonitions do not support the simpler syntax https://github.com/jgm/commonmark-hs/issues/75
- The auto_identifiers uses a different algorithm – I made the previous ones explicit.
- Languages (classes) of code blocks cannot contain whitespace so we have to use “pycon” alias instead of Python “console” as GitHub’s linguist

While at it, I also fixed the following issues:
- ShellSesssion was used
- Removed some pointless docbook tags.
2021-06-07 06:34:59 +02:00
est31
49bd30eb33 Add the -a param to the docs
The patch utility does not understand git formatted patches.
For text files, there is no problem, but binary files use the
git format.

The -a param makes git diff put binary files into the patch in
raw format that can be understood by the patch tool.
2021-06-06 21:45:57 +02:00
Ben Siraphob
68b5b850d5 coding-conventions: remove reference to stdenv.lib 2021-06-03 19:54:53 +07:00
Stefan Frijters
585f63b364
doc/coding-conventions: Add documentation for fetchpatch optional arguments 2021-05-28 14:22:46 +02:00
Sandro
f66a5695b4
Merge pull request #121252 from NixOS/SuperSandro2000-patch-1
doc/contributing: add unnecessary string conversions
2021-05-17 02:40:29 +02:00
Luke Granger-Brown
147c701583
Merge pull request #120534 from davidak/package-tests
doc: add instructions for creating package tests
2021-05-01 22:31:02 +01:00
Sandro
08ab1d9572
doc/contributing: add unnecessary string conversions 2021-04-30 11:31:48 +02:00
Sandro
226b043cef
doc/contributing: clarify stdenv.lib deprecation 2021-04-30 11:05:39 +02:00
davidak
c357fbeb51 doc: add instructions for creating package tests 2021-04-24 18:39:45 +02:00
Bobby Rong
0fd55565d3 doc/contributing/*.xml: Convert to markdown 2021-04-23 12:53:58 +08:00