Commit graph

79 commits

Author SHA1 Message Date
Valentin Gagarin 99c5413961
Merge pull request #200951 from jtojnar/docs-update-script-commit-feature
docs/stdenv: Document updateScript features
2023-03-21 12:50:35 +01:00
Jan Tojnar 90074803e6 docs/stdenv: Document updateScript features
This was removed in c1b05442ff
for stabilization but it has worked quite well.
2023-03-21 11:59:08 +01:00
Jan Tojnar d0e8c7087d docs/stdenv: Document updateScript execution 2023-03-21 11:59:08 +01:00
Arnout Engelen 8ad8f9d266
doc/stdenv: add quotes to run phases with newlines
Without quotes newlines in environment variables get converted to spaces,
so any overridden phases would not work.
2023-03-17 13:30:57 +01:00
Artturin 6b2a05e190 treewide: manual fixups for
treewide: use toString on list NIX_CFLAGS_COMPILE
treewide: move NIX_CFLAGS_COMPILE to the env attrset
2023-02-22 21:23:04 +02:00
milahu 121fbb3cf7
docs: Building a stdenv package in nix-shell (#216650)
* docs: Building a stdenv package in nix-shell
2023-02-16 19:21:12 +01:00
Guillaume Girol 0a598d6ea5
doc: add a simpler explanation of dependencies (#213403)
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-10 18:41:31 +01:00
Naïm Favier f98c4eac33
doc/stdenv: fixup #212642 2023-02-07 12:47:28 +01:00
github-actions[bot] 578f1ba854
Merge master into staging-next 2023-01-26 18:01:29 +00:00
Naïm Favier edb26159db
doc/stdenv: clarify default check target 2023-01-25 18:26:18 +01:00
Guillaume Girol d26caea94b doc: adapt to nativeCheckInputs 2023-01-21 16:42:10 +01:00
Guillaume Girol 90c78aee6c Merge branch 'nativeCheckInputs' into staging-nativeCheckInputs 2023-01-21 12:00:00 +00:00
Robert Hensing 01d7f19346 multi-outputs.sh: Improve _assignFirst error message
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-16 12:57:01 +01:00
Martin Weinelt c1e6c6af69 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 03:51:33 +01:00
Max Hausch 540c14338d
doc/stdenv: Add information about the doDist variable 2023-01-09 08:17:53 +01:00
github-actions[bot] dc7ebb0163
Merge staging-next into staging 2022-12-18 18:01:41 +00:00
figsoda 403e25e3e3 doc: fix typos 2022-12-17 18:21:48 -05:00
Artturin fda61e9066 add docs for prependToVar and appendToVar 2022-12-10 04:22:11 +02: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
github-actions[bot] 4517d658d3
Merge master into staging-next 2022-11-08 18:01:16 +00:00
Ryan Mulligan 962a810513 nixpkgs/doc/stdenv: fix admonition class
Change to match the formatting of the other admonitions that use
classes.

This was breaking the mmdoc output.
2022-11-07 13:32:21 -08:00
Daniel Barter 77bd639c4c cc-wrapper: adding a cc-wrapper-hook to the cc-wrapper 2022-10-26 09:33:43 -07:00
Robert Hensing c1311d1223 doc/stdenv: Move Other hooks after all hooks 2022-10-13 21:15:19 +02:00
Robert Hensing 53088569de doc/stdenv: Clarify that the wrappers come with hooks 2022-10-13 21:14:21 +02:00
Robert Hensing f4c6286284 doc/stdenv: Improve language a bit 2022-10-13 21:14:04 +02:00
Robert Hensing 2db8de920e doc: Move non-stdenv hooks out of stdenv chapter 2022-10-13 15:40:27 +02:00
Robert Hensing 5b055190e3 doc/stdenv: Clarify status of the hooks 2022-10-13 13:36:47 +02:00
José Romildo 1f239257c5 maintainers/scripts/update.nix: make package name, pname and old version available to the update script 2022-09-26 22:16:19 -03:00
Marc Scholten 41de927b70 doc: Clarify default value of sourceRoot 2022-09-03 11:13:58 +02:00
Valentin Gagarin 16eb45c655 doc: add note about makeWrapper and PATH modification 2022-08-19 13:11:27 -05:00
Valentin Gagarin 163e81aac0
Merge pull request #184848 from jtojnar/mkder-rec-anchor
doc: Add anchor to Recursive attributes in `mkDerivation`
2022-08-03 11:18:36 +02:00
Jan Tojnar 4cb8aa1324 doc: Add anchor to Recursive attributes in mkDerivation
So that we can link to it stably.
2022-08-02 18:01:03 +02:00
Bernardo Meurer 88c63ca65a
Merge pull request #182513 from trofi/strip-for-host-and-target
gcc: enable stripping for cross-compilers
2022-07-28 00:30:49 -07:00
Sergei Trofimovich 0f45ce6e77 setup-hooks/strip.sh: add strip{All,Debug}ListTarget variables
This change mimics existing strip{All,Debug}List variables to
allow special stripping directories just for Target.

The primary use case in mind is gcc where package has to install
both host and target ELFs. They have to be stripped by their own
strip tools accordingly.

Co-authored-by: Rick van Schijndel <Mindavi@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-07-25 11:06:45 +01:00
Artturi 79e8669003
Merge pull request #179603 from Artturin/subplacemultiple 2022-07-24 04:14:09 +03:00
aiotter dbd75e3229 doc: update cmake doc for better readability 2022-07-16 19:10:31 +09:00
Robert Hensing 3c1447f807
Merge pull request #121015 from fricklerhandwerk/docs-patch-shebangs
docs: expand explanation of patchShebangs hook
2022-07-13 12:17:11 +02:00
Valentin Gagarin b7b86c4f54
add stable anchor
Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
2022-07-13 10:19:23 +01:00
Artturin ba1efa71ae stdenv: substituteInPlace: accept multiple filenames
I don't know if getopt is available everywhere, so I did not use it.

in any case, it can be changed to use getopt in the future if
needed.
2022-06-29 22:03:19 +03:00
Valentin Gagarin c3ea8c4dd9 do not mention trivial builders 2022-06-10 11:43:57 +02:00
Valentin Gagarin e132e6be3c
fix heading level 2022-06-09 13:43:21 +02:00
Valentin Gagarin f70073d72d
remove specifics on where build inputs come from in PATH
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-06-08 11:43:32 +02:00
Naïm Favier 0d6bcb513b
makeBinaryWrapper: move into its own folder
The derivation is complex enough to warrant moving out of
all-packages.nix
2022-05-10 22:07:56 +02:00
Robert Hensing 0e00acafe9 stdenv.mkDerivation: public -> finalPackage 2022-05-02 08:49:33 +02:00
Robert Hensing ca83dd1ae7 stdenv.md: Clarify overrideAttrs sentence
I weirded my English.
2022-05-02 08:49:32 +02:00
Robert Hensing d629ba27d9 Use finalAttrs instead of self for mkDerivation "overlay" 2022-05-02 08:49:31 +02:00
Robert Hensing 6d7efb3a16 stdenv.mkDerivation: Make self more overlay-like; use self.public
`self` is now arguments, like `super`. The final package is in
`self.public`.
2022-05-02 08:49:31 +02:00
Robert Hensing a4e7085227 stdenv.mkDerivation: Allow overriding of recursive definitions
See updated manual for further explanation.
2022-05-02 08:49:26 +02:00
Valentin Gagarin 311d322feb docs: sync patchShebangs comments with manual
this is not an actual sync, but rather the manual taking the leading role.
right now it does not make sense to actually change `patch-shebangs.sh`
as that would cause a rebuild of the entire universe.

we should figure out how to keep them aligned with minimal effort both
in terms of maintenance as well as navigation for readers.
2022-04-21 12:21:49 +02:00
Valentin Gagarin 9a2ed65370 fix wording, remove too much specificity
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-04-21 09:27:11 +02:00