Commit graph

173 commits

Author SHA1 Message Date
Seth Flynn d73ab2f142
doc: emphasize trade-off between versionCheckHook and testers.testVersion (#344321) 2025-01-27 00:44:44 -05:00
Peder Bergebakken Sundt 4762d9ba6e doc: emphasize trade-off between versionCheckHook and testers.testVersion 2025-01-26 17:11:00 +01:00
Yueh-Shun Li bbdf8601bc doc: add chapter Fixed-point arguments of build helpers
Add "Fixed-point arguments of build helpers" chapter in "Builde helpers" part.

Co-authored-by: nicoo <nicoo@mur.at>
Co-authored-by: Silvan Mosberger <github@infinisil.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Lin Jian <me@linj.tech>
Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-01-19 01:00:50 +08:00
Matt Sturgeon e4469b7af2
buildFHSEnv: allow specifying executableName explicitly 2025-01-08 18:33:28 +00:00
Patrick 7e504761f0
doc: fix fetchDebianPatch example 2024-12-30 12:18:47 +01:00
Jörg Thalheim ff8576f191
dockerTools.pullImage: accept hash parameter (#342400) 2024-12-09 15:32:15 +01:00
nicoo 5720f42c32 nix-prefetch-docker: provide hash in SRI format 2024-12-09 14:28:25 +01:00
nicoo d0e6b0e170 dockerTools.pullImage: accept hash parameter 2024-12-09 14:28:24 +01:00
Philip Taron 7822cb34f8
fetchgit{,hub}: add tag argument (#355973) 2024-12-05 07:40:05 -08:00
Gavin John 67a56f27f2
doc/build-helpers/testers: Fix command renamed to script (#352713) 2024-12-04 22:53:21 +00:00
Wolfgang Walther 51da8b6b00
writeReferencesToFile: remove
Had been deprecated and scheduled for removal in 24.11.
2024-11-22 21:01:53 +01:00
Atemu cb9f9a1e5a fetchgit{,hub}: add tag argument
It's become a common pattern to use `rev = "refs/tags/${version}"` rather than
just `rev = version` to ensure that the tag gets fetched rather than a branch
that has the same name. This has so far been done using boilerplate though, so
let's add a simple abstraction to fetch a tag instead.
2024-11-18 08:20:00 +01:00
Atemu 1712d71ea7 doc: document commonly used fetchgit flags
Some important ones like fetchLFS were missing. See
https://discourse.nixos.org/t/how-to-use-git-lfs-with-fetchgit/55975 for a
documented instance where this confused a user.

This still isn't complete but the remaining ones I felt were rather niche and I
am not familiar enough with them to sufficiently document their purpose or
usage.
2024-11-14 23:49:57 +01:00
Daniel Baker 052431ce98 doc: replace references to --replace for the substitute command
The `--replace` argument for `substitute` and `substituteInPlace` was
deprecated in e07a2fab7f. Updating all
references in the nixpkgs manual to use `--replace-fail`.
2024-11-06 14:08:28 -08:00
Matthias Beyer c04462bf2d
doc: Add missing debian12 attribute names (#339780) 2024-10-25 07:55:17 +02:00
Peder Bergebakken Sundt 6fd3990534 trivial: make symlinkJoin support pname+version alone 2024-09-28 01:35:47 +02:00
Tom Bereknyei d0b3364822 dockerTools: set mtime to epoch by default 2024-09-25 00:31:16 -04:00
WxNzEMof 847b4732e4 dockerTools: Allow separately specifying metadata and filesystem timestamps
Setting the image creation timestamp in the image metadata to a
constant date can cause problems with self-hosted container
registries, that need to e.g. prune old images.  This timestamp is
also useful for debugging.

However, it is almost never useful to set the filesystem timestamp to
a constant value.  Doing so not only causes the image to possibly no
longer be reproducible, but also removes any possibility of
deduplicating layers with other images, causing unnecessary storage
space usage.

Therefore, this commit introduces "mtime", a new parameter to
streamLayeredImage, which allows specifying the filesystem timestamps
separately from "created".  For backwards compatibility, "mtime"
defaults to the value of "created".
2024-09-25 00:23:20 -04:00
networkException f0b6425d73
doc/build-helpers: fix wrong invokations of writeTextFile with destination
This patch fixes occurances of writeTextFile invokations with
a destination set but without a leading slash. This would cause
an opaque build time error.
2024-09-21 23:59:42 +02:00
nicoo 19cf0942e3 doc: update all fetchurl invocations with a hash in SRI format 2024-09-17 10:47:31 +02:00
Matthias Beyer 5ac6c5261d
doc: Add missing debian12 attribute names
Fixes 7ec994050c, which added the debian12* attributes, but did not
update the documentation

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2024-09-05 14:05:27 +02:00
github-actions[bot] 563bb0fbc2
Merge master into staging-next 2024-09-04 18:04:23 +00:00
Robert Hensing ce974f8107
doc/dockertools: add note about base image config inheritance (#339555) 2024-09-04 17:49:09 +01:00
Mathias Sven 138d76c31b
doc/dockertools: add note about base image config inheritance 2024-09-04 15:41:32 +01:00
github-actions[bot] 4420fe8b58
Merge staging-next into staging 2024-08-28 12:05:53 +00:00
Matthias Beyer f78adb0891 doc: Move "This is equivalent to" into example block
This patch moves the code snippet which is shown as equivalent to the
example into the actual example block.

Visually, it was not easy to parse that the "equivalent" code piece
belonged to the code snippet that was hidden in the example (which is
collapsed by default).

By moving it into the example block, the "equivalent" piece is hidden by
default as well.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2024-08-28 11:26:23 +02:00
Tim Cuthbertson 7eb5c0991c doc: add proxy usage to fetchers chapter 2024-08-23 21:34:30 +10:00
Philip Taron be245de559
Merge pull request #333262 from nbraud/doc/runCommandWith
nixpkgs-manual: Document `runCommandWith`, refactor `runCommand{,CC,Local}`
2024-08-19 12:29:58 -07:00
nicoo 9e5d56e8c6 doc/build-helpers: forward-link runCommand* in runCommandWith 2024-08-19 19:16:43 +00:00
nicoo 2b8a6a7e43 doc/build-helpers: refactor the paragraph about runCommandLocal 2024-08-19 19:16:43 +00:00
nicoo e3d7e7f2a7 doc/build-helpers: add note relating runCommand and runCommandWith 2024-08-19 19:16:42 +00:00
nicoo 482d6eaab2 doc/build-helpers: refactor the paragraphs about runCommand{,CC}
Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2024-08-19 19:16:42 +00:00
nicoo 80e3fd91a9 doc/build-helpers: document runCommandWith
Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2024-08-19 19:16:42 +00:00
nicoo e0fc12cd12 doc: add type signature of testers.runCommand 2024-08-08 15:43:47 +00:00
nicoo d0a96c6eda testers.runCommand: add, document, and test 2024-08-08 15:29:14 +00:00
Robert Hensing 7237aa700f devShellTools: Docs, fix args env 2024-07-28 23:17:18 +02:00
Robert Hensing 4ca52fdf5f
Merge pull request #323613 from CyberShadow/fix-nix-path-without-channels-v2
nix-channel: do not set empty nix-path when disabling channels
2024-07-28 13:31:10 +02:00
Peder Bergebakken Sundt 99dec1f6b0 treewide: fix doc typos
Done with `fd \\\.md$ . --type f -x typos --write-changes`
2024-07-26 00:55:13 +02:00
Robert Hensing c5e5aa7266
Merge pull request #308822 from yorickvP/yorickvp/streamLayeredImage-overridable
dockerTools.streamLayeredImage: add includeNixDB argument, expose conf and streamScript
2024-07-24 16:02:35 +02:00
Robert Hensing 3fb14db08a testers.shellcheck: init
Needed for testing upcoming commit.
2024-07-16 20:10:02 +02:00
aleksana 2969ce1dd3 doc/fetchers: correct fetchtorrent sha256 attribute to hash
This seems incorrect because sha256 is not an acceptable attribute of
fetchtorrent.
2024-07-04 18:43:48 +08:00
Silvan Mosberger 06a8bee760
Merge pull request #323398 from NixOS/prep-dev-shell
init `devShellTools`
2024-07-03 05:19:42 +02:00
Doron Behar 32d57df8ac
Merge pull request #320266 from doronbehar/pkg/versionInstallHook
versionCheckHook: init
2024-07-03 01:37:49 +03:00
a-kenji ec5679262f writeScriptBin: fix typo in docs 2024-07-02 15:51:18 +02:00
Robert Hensing 8398e087cd devShellTools.{stringValue -> valueToString} 2024-06-29 17:22:57 +02:00
Robert Hensing 469039098b devShellTools.stringValue: init 2024-06-29 17:21:01 +02:00
Robert Hensing 091d8370a2 devShellTools: init (empty) 2024-06-29 16:41:13 +02:00
Doron Behar f42d4debf0 doc: recommend versionCheckHook whenever relevant 2024-06-28 18:03:59 +03:00
Artturin 2be37441da doc: Improve the makeSetupHook example
also format it with nixfmt
2024-06-15 21:02:53 +03:00
Travis A. Everett 9ff9bbdb34
doc: add stdenv passthru chapter (#315909)
* doc: add stdenv passthru chapter

Broad strokes:
- create the chapter
- move existing stdenv passthru coverage into it
- move out-of-place coverage of passthru.tests from the stdenv meta chapter into it
- (try to) apply 1-sentence-per-line to text I've touched
- add legacy anchors for everything moved
- update existing links to the new anchors
- add tentative motivating text
- make nixpkgs-internal links relative/branchless

razor: if it is only ever needed by contributors, which is likely if links
refer to the latest revision of the source code, then it's for
the contributor guide

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-06-11 10:51:03 +02:00
Alyssa Ross ba96c1f7e5 doc: fix make-disk-image.nix example 2024-06-04 21:46:41 +01:00
Ivan Trubach b25101d1fb doc: fix testers.testEqualContents fragment link 2024-05-31 05:35:48 +03:00
Robert Hensing e0c43a96d2
testers.lycheeLinkCheck: init (#298665)
* testers.lycheeLinkCheck: init

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-27 01:14:19 +02:00
Yorick van Pelt 4d51990bc5
dockerTools: document streamLayeredImage's includeNixDB argument 2024-05-06 15:06:50 +02:00
Yorick van Pelt 62e9e0f963
dockerTools: add includeNixDB to buildImage and document 2024-05-06 14:57:08 +02:00
Jan Tojnar 4e02eae70e doc/gnome: Use wrapGApps* hook for referring to the hook family 2024-04-27 00:05:46 +02:00
Peder Bergebakken Sundt bbb1f25bfb buildFHSEnvBubblewrap: do not infer pname from name 2024-04-24 15:26:52 +02:00
DS e67c738314 doc: update fetchzip docs, add examples and follow conventions
With updates in a doc team meeting with Valentin, Silvan and Johannes :)
2024-04-11 17:09:41 +02:00
Daniel Sidhion c9c7d2f237
doc: document fetchurl more completely, follow doc conventions (#300429)
* doc: document fetchurl more completely, follow doc conventions

Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2024-04-04 14:12:42 +02:00
Daniel Sidhion 0decb324b3
doc: improve fetchers overview, deduplicate readme content, follow doc conventions (#297654)
* doc: improve fetchers overview, deduplicate readme content

* Improve caveat explanation and some fetchurl content

* move out consumer docs on source fetching

* move note on mirror URLs to the relevant section

this may be better suited for the `fetchurl` reference, but it's probably better to
just render that information into the manual. for now, because
- contributor documentation encourages mirrors
- we can expect contributors to dig into the source
- linking source files is trivial in in-code documentation
we leave it there.

* move instructions for updating hashes to the manual

* Add more clarity on text, reorganise source hash methods

---------

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Dominic Mills-Howell <dominic.millz27@gmail.com>
Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com>
2024-04-03 08:18:11 +02:00
Janne Heß bc5ee2b8f8 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
2024-03-28 09:28:12 +01:00
Janne Heß fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Janne Heß bc77c7a973 treewide: Mark Nix blocks in markdown as Nix
This should help us with highlighting and future formatting.
2024-03-28 09:28:12 +01:00
sekc b1b78f4369
doc/build-helpers: add missing semicolons (#298632)
Co-authored-by: seksea <williamireland0@gmail.com>
2024-03-25 12:59:19 +01:00
Someone 63709965b7
Merge pull request #178717 from ShamrockLee/write-multiple-references
trivial-builders: replace writeReferencesToFile with writeClosure
2024-03-19 08:57:20 +00:00
Daniel Sidhion 83f77a1b38
Merge pull request #294019 from Lurkki14/doc-makedesktopitem
doc: document makeDesktopItem
2024-03-18 16:08:29 -07:00
Yueh-Shun Li e9fd4389d2 writeClosure: init, replacing writeReferencesToFile
Replace writeReferencesToFile with writeClosure.

Make writeClosure accept a list of paths instead of a path.

Re-implement with JSON-based exportReferencesGraph interface provided by
__structuredAttrs = true.

Reword the documentation.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Someone Serge <sergei.kozlukov@aalto.fi>
2024-03-19 02:45:50 +08:00
Jussi Kuokkanen 7d61bb198f doc: document makeDesktopItem 2024-03-18 18:24:51 +02:00
Silvan Mosberger f60515ddea
Merge pull request #293416 from DanielSidhion/remove-makesnap
snapTools: remove
2024-03-14 16:46:22 +01:00
Robert Hensing e99021ff75 trivial-builders: Deduplicate docs
I didn't have the opportunity to do all work at once, so I've added
TODOs to bring attention to the situation.
2024-03-11 11:33:14 +01:00
DS 1d85557b50 snapTools: remove
`snapTools.makeSnap` has produced broken snaps since at least Oct 2020,
as indicated by the following issue: https://github.com/NixOS/nixpkgs/issues/100618

No person has shown interest in maintaining it, and given that there is
no fix available, it's assumed that all attempts made to fix that
function have not succeeded.

Given that `snapTools` only contained `makeSnap`, it was removed
completely.
2024-03-04 22:22:14 -08:00
DS 62552e3683 doc: update docs for portableService, follow doc conventions 2024-02-29 17:10:01 +01:00
Silvan Mosberger 67e55070eb
Merge pull request #290886 from DanielSidhion/update-ocitools
doc: update docs in ociTools, follow doc conventions
2024-02-29 16:32:36 +01:00
DS c73de6fac3 doc: update docs in ociTools, follow doc conventions 2024-02-29 16:30:04 +01:00
WxNzEMof 7799f4695b Document the new streamLayeredImage parameters 2024-02-26 18:41:07 +00:00
Matthieu Coudron 0c3eca2682
doc/fetchers: document downloadToTemp for fetchurl (#288762)
* doc/fetchers: document downloadToTemp for fetchurl

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-02-22 16:10:21 +01:00
Robert Hensing d2dfcfcfad
Merge pull request #289584 from athre0z/docker-zstd
dockerTools: configurable compression schema
2024-02-19 18:06:54 +01:00
Joel Höner 4b603ad9cd dockerTools: configurable compression schema
This commit adds support for swapping out the compression algorithm
used in all major docker-tools commands that generate images. The
default algorithm remains unchanged (gzip).
2024-02-17 18:52:42 +01:00
DS ba79b098ea doc: use long-form docker commands, improve wording 2024-02-12 15:38:00 -08:00
DS 5677230de3 doc: update buildNixShellImage docs, add streamNixShellImage docs 2024-02-08 07:49:16 -08:00
Silvan Mosberger b94e9dd7a5
Merge pull request #285223 from DanielSidhion/update-dockertools-envhelpers
doc: update environment helpers in dockerTools docs, add fakeNss section
2024-02-08 16:31:33 +01:00
Rebecca Turner 41376dd064
writeShellApplication: Update manual 2024-02-01 16:02:34 -08:00
Daniel Sidhion 2f61aff9ae
doc: update dockerTools.exportImage content and use doc conventions (#283392)
* doc: update dockerTools.exportImage content and use doc conventions

* Apply suggestions from code review

Co-authored-by: Silvan Mosberger <github@infinisil.com>

---------

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2024-02-01 16:54:26 +01:00
DS 0445c39047 doc: update environment helpers in dockerTools docs, add fakeNss section
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-02-01 01:37:31 -08:00
Silvan Mosberger 2c2b366c59
Merge pull request #283106 from DanielSidhion/update-dockertools-pullimage
doc: update dockerTools.pullImage content and use doc conventions
2024-01-25 16:54:18 +01:00
DS e08482a601 doc: update dockerTools.pullImage content and use doc conventions 2024-01-25 16:51:27 +01:00
Silvan Mosberger f7609960db
Merge pull request #283394 from DanielSidhion/fix-dockertools-example
doc: add missing attribute to example in dockerTools
2024-01-25 16:19:30 +01:00
Kevin Brubeck Unhammer ad99ac9356
doc: Note on how to use shadowSetup with buildLayeredImage (#267220)
* Note on how to use shadowSetup with buildLayeredImage

* Update doc/build-helpers/images/dockertools.section.md

---------

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2024-01-25 16:10:21 +01:00
DS ad83240aad doc: add missing attribute to example in dockerTools 2024-01-23 20:58:41 -08:00
DS 2004205b7a doc: update content on dockerTools layered images and follow doc conventions 2024-01-18 17:26:24 +01:00
Silvan Mosberger af358ee11c
Merge pull request #278956 from DanielSidhion/update-dockertools-buildimage
doc: update content on dockerTools.buildImage and follow doc conventions
2024-01-18 16:18:44 +01:00
Silvan Mosberger dc30cf4f88
Merge pull request #259567 from Eisfunke/document-mkShellNoCC
doc: add section about mkShellNoCC
2024-01-18 16:10:21 +01:00
DS 2c9e2b6569 doc: update content on dockerTools.buildImage and follow doc conventions 2024-01-16 23:56:59 -08:00
Valentin Gagarin b22ec91243 review pass 2024-01-15 22:34:00 +01:00
Chris McDonough 2e2aaa1c2e do not nest a note within a warning, break out writeTextFile examples into multiple example sections, test first writeTextFile example (it was broken, heh) and fix, move prose out of code blocks 2024-01-15 11:29:35 -05:00
Chris McDonough 39a1686e56
Add a period
Co-authored-by: Alexander Groleau <alex@proof.construction>
2024-01-15 10:49:51 -05:00
Chris McDonough cec3e9441c
Move prose
Co-authored-by: Alexander Groleau <alex@proof.construction>
2024-01-15 10:49:36 -05:00
Robert Hensing 559d06bbb2 trivial-builders: Remove redundant docs - link instead 2024-01-15 09:02:45 +01:00
Nicolas Lenz 8c65bdc334
doc: add section about mkShellNoCC 2024-01-14 10:54:17 +01:00
Chris McDonough b0f542304d add to example 2024-01-12 22:59:49 -05:00