about summary refs log tree commit diff
path: root/doc/stdenv
AgeCommit message (Collapse)AuthorFilesLines
2024-04-08doc/stdenv: document prefixKey more precisely (#302535)Aleksana1-2/+2
* doc/stdenv: document prefixKey more precisely Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-03-30Revert "stdenv: add meta.repository field"K9001-4/+0
This reverts commit 7e1443abbba99e9dac29ce2ad01c1c4e4fb66070.
2024-03-29Merge pull request #294347 from lolbinarycat/meta.repositorya-n-n-a-l-e-e1-0/+4
stdenv: add meta.repository field
2024-03-29stdenv: add meta.repository fieldbinarycat1-0/+4
2024-03-28treewide: Fix all Nix ASTs in all markdown filesJanne Heß4-64/+112
This allows for correct highlighting and maybe future automatic formatting. The AST was verified to work with nixfmt only.
2024-03-28treewide: Mark Nix blocks in markdown as NixJanne Heß1-1/+1
This should help us with highlighting and future formatting.
2024-03-06Nix docs: remove `with lib;` from example codeAnderson Torres1-4/+4
Following [Best Practices](https://nix.dev/guides/best-practices#with-scopes), `with` is a problematic language construction and should be avoided. Usually it is employed like a "factorization": `[ X.A X.B X.C X.D ]` is written `with X; [ A B C D ]`. However, as shown in the link above, the syntatical rules of `with` are not so intuitive, and this "distributive rule" is very selective, in the sense that `with X; [ A B C D ]` is not equivalent to `[ X.A X.B X.C X.D ]`. However, this factorization is still useful to "squeeze" some code, especially in lists like `meta.maintainers`. On the other hand, it becomes less justifiable in bigger scopes. This is especially true in cases like `with lib;` in the top of expression and in sets like `meta = with lib; { . . . }`. That being said, this patch removes most of example code in the current documentation. The exceptions are, for now - doc/functions/generators.section.md - doc/languages-frameworks/coq.section.md because, well, they are way more complicated, and I couldn't parse them mentally - yet another reason why `with` should be avoided!
2024-01-18Merge master into staging-nextgithub-actions[bot]1-2/+2
2024-01-14stdenv: substituteStream: deprecate --replace in favor of ↵Peder Bergebakken Sundt2-7/+18
--replace-{fail,warn,quiet}
2024-01-03doc: replace pcre with pcre2 in example scriptOlivia Crain1-2/+2
https://www.pcre.org/ The `pcre` library is "now at end of life, and is no longer being maintained," according to the upstream maintainers. Accordingly, we should replace uses of `pcre` with its actively maintained successor, `pcre2`, wherever possible .
2023-12-21Merge pull request #271797 from bzm3r/masterSilvan Mosberger1-4/+40
doc: diagram explaining what it means for a dependency to be propagated
2023-12-21doc: Clarify dependency propagationBrian Merchant1-4/+40
2023-12-20Merge pull request #271360 from mattpolzin/patch-1Silvan Mosberger1-3/+3
doc: clarify stdenv phase flag attributes
2023-12-16doc: Update stdenv.chapter.md (#274706)Danila Danko1-1/+1
Extended genericBuild description
2023-11-30doc: clarify stdenv phase flag attributesMathew Polzin1-3/+3
2023-11-20doc/stdenv: update manual phases execution instructionsIvan Mincik1-3/+8
Update instructions for manual build phases execution via `nix-shell` to cover all phases. There is no easy way of getting those commands, so it makes a sense to have them all properly documented.
2023-11-09doc: avoid 'simply' (#266434)Arnout Engelen1-4/+4
While the word 'simply' is usually added to encourage readers, it often has the opposite effect and may even appear condescending, especially when the reader runs into trouble trying to apply the suggestions from the documentation. It is almost always an improvement to simply drop the word from the sentence. (there are more possible improvements like this, we can apply those in separate PRs)
2023-11-07doc: rename sub-section Recursive attributes in stdenv -> Fixed-point ↵Yueh-Shun Li1-1/+1
arguments in stdenv Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-10-23doc/stdenv: rewrite manual build procedure to be closer to an auto-build ↵Jade Lovelace1-6/+43
(#262137) * doc/stdenv: rewrite manual build procedure to be closer to an auto-build This is based on <https://jade.fyi/blog/building-nix-derivations-manually/> plus some more original research. The previous version of this section did not work for your choice of simple Haskell package, e.g. haskellPackages.hscolour, due to things like `compileBuildDriverPhase` and other custom phases that it does not address at all. It seems more correct to use genericBuild in development to harmonize it with what is actually done. I feel a little bit like I am committing a sin by suggesting using the experimental CLI in the manual (afaict I am the first to do this), but I have given the old version of the command, and there are justifiable reasons to do it: * The noted limitations with env-vars are fixed. The one with the non-empty temp directory was one I ran into myself and oh boy was that not fun to debug. * Additionally the outputs are set *before* sourcing `setup.sh`: there is an issue with nix-shell where the original version of `$out` winds up in `NIX_LDFLAGS` due to _addRpathPrefix, which means that resulting executables may not run properly. It is sad that `nix develop` propagates a wrong value of `SHELL` to builders, though. It is equally sad that `nix-shell` is essentially abandoned upstream, with undocumented and not insignificant differences from `nix develop`. For the exact script differences: https://github.com/NixOS/nix/blob/17e6b85d05b3d32df244b1d4e89aa41fd8bdcae8/src/nix-build/nix-build.cc#L516-L551 https://github.com/NixOS/nix/blob/db026103b18fb8b5a719594502edd0f89eb9c268/src/nix/get-env.sh Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-09-29nixpkgs manual: add an alternative example in stdenv-separateDebugInfo (#257861)Alejandro Sánchez Medina1-4/+47
* nixpkgs manual: add an alternative example in stdenv-separateDebugInfo This change gets rid of the indirect reference to `nix-env -i` usage and shows how to achieve the same goal with a shell expression. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-09-27doc: fix wrong flag in description of `bindnow`Felix Yan1-1/+1
`-z bindnow` doesn't exist. The actual flag added is `-z now`.
2023-09-25remove the misleading warning on using `nix-env` for split outputs (#255947)Valentin Gagarin1-39/+5
The text was originally added [0] following an apparently incomplete research on how everything plays together. In fact, Nix propagates `outputs` to the corresponding nested derivations, and there is some messy behavior in Nixpkgs that only seems to propagate `meta.outputsToInstall` in `buildEnv`[1]. This change moves the hints on how to use NixOS specifics to NixOS module documentation (which is hopefully easier to find through search.nixos.org), describes the default behavior in Nixpkgs (updating a the link to the source), and removes the confusing mention of `nix-env`. the last of them should not be there to begin with. we don't want beginners to use `nix-env`, as this is known to run them into trouble eventually. [0]: https://github.com/NixOS/nixpkgs/pull/76794 [1]: https://github.com/NixOS/nixpkgs/blob/1774d07242995050d2d8a91cb4da0855eac2e472/pkgs/build-support/buildenv/default.nix#L66
2023-09-15Merge pull request #254967 from nbraud/sha256-to-hash/top-levelMaciej Krüger1-1/+1
2023-09-14doc: link, instead of just mentioning, Nix manual (#255126)asymmetric1-1/+1
Instead of just telling the reader to go find the relevant section of the Nix manual, let's just link to it. Yay hypertext!
2023-09-14Link to usage of pkg description instead of referring to nix-env (#255127)Maximilian Ehlers1-1/+2
* Updates meta.chapter.md with a reference link to the usage of the package description field instead of referring to nix-env --------- Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-09-13doc: Replace `sha256` with `hash` where appropriatenicoo1-1/+1
2023-09-05Merge pull request #218783 from timbertson/stripExcludeExtensionsArtturi1-0/+22
2023-09-03setup-hooks/strip: add stripExcludeTim Cuthbertson1-0/+22
2023-08-29Merge pull request #245583 from galenhuntington/doc-fixArtturi1-1/+1
2023-08-15doc/stdenv/stdenv.chapter.md: add information about nix-update-script and ↵Nick Hu1-0/+10
nixpkgs-update
2023-08-04treewide: update mainProgram docsArtturin1-1/+1
2023-08-03doc: make `sourceRoot` and `setSourceRoot` documentation match the ↵Jan Malakhovski1-2/+7
implementation, fix examples
2023-07-26doc/stdenv: Minor syntax fix.Galen Huntington1-1/+1
2023-07-01doc: render nixpkgs manual with nrdpennae1-8/+3
also updates nixdoc to 2.3.0. the nixdoc update is not a separate commit because that would leave the manual build broken for one commit, potentially breaking bisects and rebases.
2023-06-13Merge pull request #237068 from pennae/manual-normalizationValentin Gagarin2-4/+5
2023-06-11doc: correct typos and spelling (#237098)Andrew2-2/+2
2023-06-10doc: normalize markdown for nixos-render-docspennae2-4/+5
pandoc recognizes `::: note` admonitions, nixos-render-docs only recognizes `::: {.note}`. surprisingly pandoc also emits the correct docbook tags for `[](#xref)`s, so we can use that too.
2023-05-30doc: clarify that meta.timeout is only for HydraAlyssa Ross1-1/+1
I read this and expected it to be a timeout that was always applied when building the derivation, but it's actually a Hydra-specific thing.
2023-05-20doc: fix typoNicolas Benes1-1/+1
2023-05-18doc/stdenv/Dependencies: fix inference rule var nameJan Tojnar1-1/+1
t0 is mentioned in the conclusion so we cannot use placeholder in the premise.
2023-04-24doc/stdenv/meta.chapter.md: document meta.badPlatforms (#225276)Adam Joseph1-1/+18
* doc/stdenv/meta.chapter.md: document meta.badPlatforms We don't have any documentation for the `meta.badPlatforms` attribute. This commit adds documentation for it.
2023-04-24Merge pull request #225272 from amjoseph-nixpkgs/pr/docs/broken-vs-badPlatformsAdam Joseph1-1/+20
doc/stdenv/meta.chapter.md: explain difference between broken and badPlatforms
2023-04-23remove trailing whitespaceAdam Joseph1-1/+1
2023-04-24Update doc/stdenv/meta.chapter.mdAdam Joseph1-1/+17
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-24Update doc/stdenv/meta.chapter.mdAdam Joseph1-1/+2
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-15doc/stdenv: don't use name in examples, highlight preferring pnamegilice1-4/+8
2023-04-11doc/stdenv/meta.chapter.md: explain difference between broken and badPlatformsAdam Joseph1-1/+3
There has been a longstanding ambiguity between `broken` and `badPlatforms`, which seem to serve overlapping purposes. This commit adds to the documentation two examples of constraints which cannot be expressed by `platforms` and `badPlatforms`. This commit also mentions `NIXPKGS_ALLOW_BROKEN=1` for overriding `broken`.
2023-03-27doc: assign ids to many headingspennae2-9/+9
without stable ids on headings we cannot generate stable links to these headings. nrd complains about this, but the current docbook workflow does not. a few generated ids remain, mostly in examples and footnotes. most of the examples are generated by nixdoc (which has since gained MD export functions, and the MD export does generate IDs).
2023-03-21Merge pull request #200951 from jtojnar/docs-update-script-commit-featureValentin Gagarin1-21/+89
docs/stdenv: Document updateScript features
2023-03-21docs/stdenv: Document updateScript featuresJan Tojnar1-18/+79
This was removed in https://github.com/NixOS/nixpkgs/commit/c1b05442ffd6cf3cf529cad469bebe8169b156e9 for stabilization but it has worked quite well.