summary refs log tree commit diff
path: root/doc/stdenv
AgeCommit message (Collapse)AuthorFilesLines
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.
2023-03-21docs/stdenv: Document updateScript executionJan Tojnar1-4/+11
2023-03-17doc/stdenv: add quotes to run phases with newlinesArnout Engelen1-4/+4
Without quotes newlines in environment variables get converted to spaces, so any overridden phases would not work.
2023-02-22treewide: manual fixups forArtturin1-1/+1
treewide: use toString on list NIX_CFLAGS_COMPILE treewide: move NIX_CFLAGS_COMPILE to the env attrset
2023-02-16docs: Building a stdenv package in nix-shell (#216650)milahu1-0/+21
* docs: Building a stdenv package in nix-shell
2023-02-10doc: add a simpler explanation of dependencies (#213403)Guillaume Girol1-13/+89
Co-authored-by: Jan Tojnar <jtojnar@gmail.com> Co-authored-by: pennae <82953136+pennae@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-07doc/stdenv: fixup #212642Naïm Favier1-2/+3
2023-01-26Merge master into staging-nextgithub-actions[bot]1-2/+2
2023-01-25doc/stdenv: clarify default check targetNaïm Favier1-2/+2
2023-01-21doc: adapt to nativeCheckInputsGuillaume Girol1-2/+10
2023-01-21Merge branch 'nativeCheckInputs' into staging-nativeCheckInputsGuillaume Girol2-3/+11
2023-01-20cross-compilation.chapter.md: correct doCheck conditionalArtturin1-1/+1
2023-01-16multi-outputs.sh: Improve _assignFirst error messageRobert Hensing1-1/+1
Closes #16182 This improves the error message Error: _assignFirst found no valid variant! which occurred when the set of outputs was not sufficient to set the various outputDev, outputBin, etc variables. Specifically, this would mean that "out" is not among the outputs, which is valid for a derivation. This changes the message to something like error: _assignFirst: could not find a non-empty variable to assign to outputDev. The following variables were all unset or empty: dev out. If you did not define an "out" output, make sure to define all the specific required outputs: define an output for one of the unset variables. While this isn't a full explanation of what stdenv can and can not do, I think it's vast improvement over the 0 bits of information that it used to provide. This at least gives a clue as to what's going on, and even suggests a fix, although probably multiple such fixes are required in an instance where someone starts with a no-out derivation from scratch (and decide to persist).
2023-01-11Merge remote-tracking branch 'origin/master' into staging-nextMartin Weinelt1-0/+4
2023-01-10Merge pull request #208252 from helsinki-systems/doc/doDistValentin Gagarin1-0/+4
doc/stdenv: Add information about the doDist variable
2023-01-09Merge master into staging-nextgithub-actions[bot]1-1/+1