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.
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.
The `--replace` argument for `substitute` and `substituteInPlace` was
deprecated in e07a2fab7f. Updating all
references in the nixpkgs manual to use `--replace-fail`.
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".
This patch fixes occurances of writeTextFile invokations with
a destination set but without a leading slash. This would cause
an opaque build time error.
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>
* 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>