Commit Graph

101 Commits

Author SHA1 Message Date
Adam Joseph
81bc106e08 meta.sourceProvenance documentation: clarify it is unaffected by changes to meta.license
This commit clarifies that the meaning of the `meta.sourceProvenance`
field is independent of and unaffected by the value of the
`meta.license` field.  This is based on the intent of the RFC author
as expressed here:

  https://github.com/NixOS/nixpkgs/pull/161098#issuecomment-1081270201

This clarification is added for two reasons:

1. If in the future there should be some disagreement about what
   `sourceProvenance` to assign to a package, this may help resolve
   the disagreement.  Any interpretation of `sourceProvenance` which
   is influenced by the `meta.license` is clearly an incorrect
   interpretation.

2. If it should turn out that it is impossible to disentangle
   `sourceProvenance` from `meta.license`, this would indicate the
   need for changes to the `sourceProvenance` scheme.  That change
   might be as simple as replacing the sentence added by this commit
   with some other sentence explaining how the two fields influence
   each other.

This commit implements the recommendation made in the paragraph of
this comments which begins with "Please say this explicitly...":

  https://github.com/NixOS/nixpkgs/pull/161098#issuecomment-1081309089
2022-05-30 16:27:34 +08:00
Robert Scott
9d0784829a add initial meta.sourceProvenance documentation 2022-05-30 16:27:34 +08:00
Artturin
c1fffdfffb treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
Artturin
0c4d65b21e treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03: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
2f21bc2fdb doc/stdenv/meta: tests -> passthru.tests
Make the text understandable without knowing that these are identical.

Co-authored-by: Daniël de Kok <me@github.danieldk.eu>
2022-05-02 08:49:30 +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
Samuel Ainsworth
a7fc2f6392 autoPatchelfHook: more precise dependency ignorance 2022-04-11 01:28:55 +00:00
Adam Joseph
7dbe7487b6
Update doc/stdenv/cross-compilation.chapter.md
Co-authored-by: Ben Siraphob <bensiraphob@gmail.com>
2022-04-03 17:43:52 +00:00
Adam Joseph
c9d66a7fff cross-compilation.chapter.md: give examples of all depFooBar cases
This commit describes the "->" notation for dependency types in
greater detail, and uses g++ to provide examples of all six cases
(although the host->target and target->target examples are a bit
artificial).

It also adds three more rows to the table for the "->*" dependency
types for non-compiler-like packages; these dependency types were
already present in the documentation but the "*" was not really
explained.

Lastly, this commit adds a hyperlink to the table from the place where
it is mentioned in the "specifying dependencies" chapter.
2022-04-02 19:41:49 -07:00
Jan Tojnar
e61eec13a5
Merge pull request #159344 from symphorien/doc-remove-references-to
doc: document remove-references-to
2022-02-19 15:17:05 +01:00
Guillaume Girol
f16a62bd63 doc: document remove-references-to 2022-02-19 12:00:00 +00:00
Guillaume Girol
02a8d5984c doc: discourage setting phases, document/encourage runHook instead.
Source:
https://matrix.to/#/!kjdutkOsheZdjqYmqp:nixos.org/$mff3KCoPY5sfgsUhKn0e4va7hnz7KMXARaO2_UaLNM4?via=nixos.org&via=matrix.org&via=nixos.dev
2022-02-12 12:00:00 +00:00
Robert Hensing
c9b3d27be0
stdenv.md: Call out that genericBuild has correct order
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-02-02 23:45:51 +01:00
Robert Hensing
0838f79f0b stdenv.md: Document genericBuild 2022-02-01 16:58:52 +01:00
Robert Hensing
b08ee51cc7 stdenv.md: Remove off topic phase propaganda
Phases are cool, I get it, but the reader will enjoy it when they
see it. And they'll see it sooner if they don't have to read about
it.
2022-02-01 16:46:18 +01:00
Felix Buehler
7801f72b4c meta.updateWalker: remove, because it is not used 2022-01-26 21:46:07 +01:00
Robert Hensing
9fb7d91888
Merge pull request #124556 from bergkvist/bergkvist/make-c-wrapper
Generate tiny compiled binary for wrapping executables
2021-12-10 00:45:30 +01:00
Doron Behar
ceffea674d
Small rephrase of wrapProgram documentation
Co-authored-by: Julian Stecklina <js@alien8.de>
2021-12-09 23:24:13 +02:00
Doron Behar
c42e6741b2 Rephrase documentation for both makeWrapper implementations 2021-12-09 16:02:02 +02:00
Doron Behar
32d566e1b9 wrapProgramBinary -> binaryWrapProgram 2021-12-08 18:59:38 +02:00
Doron Behar
2b103ab8a1 Remove TODO in documentation 2021-12-02 10:43:47 +02:00
Jan Tojnar
23f71e9427
Merge pull request #136345 from Pamplemousse/doc
doc: clarification of dependencies related attributes
2021-10-26 09:52:37 +02:00
Doron Behar
eb048d8fe2 Rephrase makeWrapper setup-hook 2021-10-20 08:59:29 +03:00
Doron Behar
6517e5b10f Improve explenations for wrap*Program 2021-10-19 17:33:02 +03:00
Doron Behar
ba86a1916b makeBinaryWrapper: Document 2021-10-19 05:30:42 -07:00
laikq
6ef3c96ddf doc: reference sourceRoot in description of srcs 2021-10-05 08:47:08 +02:00
ppom
896623dbe9 patchelf: fix homepage 2021-09-21 13:04:09 +02:00
Pamplemousse
f48c175fb2 doc: clarification of dependencies related attributes
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-31 16:57:46 -07:00
figsoda
4b93f966c5 doc: stdenv: document meta.mainProgram 2021-08-19 14:00:04 -04:00
Arnout Engelen
d09e0be1c4
nixpkgs-docs: when to prefer passthru.tests over installCheckPhase
And mention you can have either lightweight 'package' or
more heavyweight 'NixOS' (module) tests.

This was suggested at
https://github.com/ryantm/nixpkgs-update/issues/260#issuecomment-821287971
and discussed further at
https://github.com/NixOS/nixpkgs/pull/119731
2021-08-14 09:47:21 +02:00
Niklas Hambüchen
7cfaba911d manual: Hardening: Remove now-nonexistent ArchWiki link.
The page has been replaced by the much more general page
https://wiki.archlinux.org/title/Security#Packages
which is barely talking about hardening flags any more.
2021-07-05 22:57:52 +02:00
Niklas Hambüchen
ac36a0f9eb manual: hardening: Fix disabled flags prose being in previous section
This confused the hell out of me, as I didn't spot the

> The following flags are disabled by default ...

when reading about `pie`, because that sentence was hidden in the
previous hardening flag's section.

Also explain that `pie` hardening is on by default on musl.
2021-07-05 16:32:55 +02:00
Alyssa Ross
b0b5ef7286 stdenv: introduce dontAddStaticConfigureFlags
With removeUnknownConfigureFlags, it's impossible to express a package
that needs --enable-static, but will not accept --disable-shared,
without overriding the result of removeUnknownConfigureFlags _again_
in pkgs/top-level/static.nix.

It would be much better (and more in line with the rest of Nixpkgs) if
we encoded changes needed for static builds in package definitions
themselves, rather than in an ever-expanding list in static.nix.  This
is especially true when doing it in static.nix is going to require
multiple overrides to express what could be expressed with stdenv
options.

So as a step in that direction, and to fix the problem described
above, here I replace removeUnknownConfigureFlags with a new stdenv
option, dontAddStaticConfigureFlags.  With this mechanism, a package
that needs one but not both of the flags just needs to set
dontAddStaticConfigureFlags and then set up configureFlags manually
based on stdenv.hostPlatform.isStatic.
2021-06-11 14:16:05 -07:00
Jan Tojnar
3c78ad2561
doc: Use markdown syntax for xrefs
Syntax is taken from MyST:

https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing
2021-06-07 06:34:59 +02:00
Jan Tojnar
6ecc641d08
doc: prepare for commonmark
We are still using Pandoc’s Markdown parser, which differs from CommonMark spec slightly.

Notably:
- Line breaks in lists behave differently.
- Admonitions do not support the simpler syntax https://github.com/jgm/commonmark-hs/issues/75
- The auto_identifiers uses a different algorithm – I made the previous ones explicit.
- Languages (classes) of code blocks cannot contain whitespace so we have to use “pycon” alias instead of Python “console” as GitHub’s linguist

While at it, I also fixed the following issues:
- ShellSesssion was used
- Removed some pointless docbook tags.
2021-06-07 06:34:59 +02:00
Emery Hemingway
29bc87e961 Fix "platfrom" typos 2021-04-10 17:10:50 +02:00
sternenseemann
cf8da7eabd doc/stdenv/cross: fix typo 2021-04-02 10:03:00 +02:00
Jan Tojnar
f854ee87f0
doc: Port stdenv to Markdown
Added the following ids to avoid possible id conflicts from ids auto-generated from titles:

- setup-hook-perl
- setup-hook-python
- setup-hook-pkg-config
- setup-hook-automake
- setup-hook-autoconf
- setup-hook-libxml2
- setup-hook-gdk-pixbuf
2021-03-14 02:18:52 +01:00
Jan Tojnar
53830ca04c
doc: Port stdenv/multiple-output to Markdown 2021-03-14 02:18:40 +01:00
Jan Tojnar
921d0269cc
doc: Port stdenv/meta to Markdown 2021-03-14 02:15:14 +01:00
Robert Hensing
7d551ead60 doc: Format 2021-03-04 18:10:57 +01:00
Sandro
d83c76ef5b
Merge pull request #113062 from SuperSandro2000/outputs-update
doc: update multiple output section with more example paths
2021-03-03 01:27:20 +01:00
Ben Siraphob
251897b40d stdenv/cross-compilation: add section on avoiding cross-compiling GCC 2021-02-22 10:57:30 +07:00
Ben Siraphob
4550d6596b docs/stdenv/cross-compilation: add binutils command section to cookbook 2021-02-21 21:56:48 +07:00
Ben Siraphob
92d319d5d5
doc/stdenv/platform-notes: convert to markdown 2021-02-21 06:45:21 +01:00