Commit Graph

208 Commits

Author SHA1 Message Date
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
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
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
fricklerhandwerk
b4d9d682c8 docs: clean up and update links to source code 2022-04-21 09:27:11 +02:00
fricklerhandwerk
e3883d2ce0 docs: clarify note on existing store paths 2022-04-21 09:27:10 +02:00
fricklerhandwerk
b0fce27ce2 docs: expand explanation of patchShebangs hook
- clarify motivation and mechanism
- explain usage
- add interlinks
- add links to sources to enable research

based on https://discourse.nixos.org/t/what-is-the-patchshebangs-command-in-nix-build-expressions/12656
2022-04-21 09:27:09 +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
Sandro Jäckel
061f514462
doc: update multiple output section with more example paths 2021-02-14 00:46:43 +01:00
Jan Tojnar
f53e0e28c3 doc: Add anchors to meta attributes 2021-02-07 23:11:41 +01:00
Profpatsch
b0c1583a0b doc: stdenv.lib -> lib
Part of: https://github.com/NixOS/nixpkgs/issues/108938

Changing the documentation to not refer to stdenv.lib is the first
step to make people use it directly.
2021-01-11 09:52:27 +01:00
Robert Hensing
3393e110a9
doc/stdenv/cross-compilation.chapter.md typo
Co-authored-by: John Ericson <git@JohnEricson.me>
2020-12-15 15:57:27 +01:00
Robert Hensing
c7e5c02374
doc/cross-compilation: Remove confusing re-explanation
See https://github.com/NixOS/nixpkgs/issues/106950

> They way it's worded says buildInputs are for build-time and nativeBuildInputs are for run-time. The other documentation leads me to believe it is the other way around.
2020-12-15 11:45:38 +01:00
Ben Siraphob
71a7249a48 doc/stdenv/cross-compilation: convert to markdown 2020-12-13 19:49:39 +07:00
Jan Tojnar
62248877ad
doc/stdenv: Fix xref to gdk-pixbuf setup hook
DocBook does not support creating labels for unordered list items so we need to add a link label ourselves.
2020-12-07 23:49:56 +01:00
Jan Tojnar
95961244d3
doc/gnome: Document gdk-pixbuf setup hook
It was briefly mentioned in stdenv docs but since it interacts with wrapGAppsHook, it should be documented here.
2020-11-26 14:06:08 +01:00
Kevin Cox
d3a30145c3
Make maintainer documentation more direct (#103455)
Additionally fixes the "list of names and emails" to be a list of maintainer expressions.

A follow-up from the discussion in https://github.com/NixOS/nixpkgs/pull/96666
2020-11-11 19:55:27 -05:00
Kevin Cox
be4d08b5b4
Merge pull request #96666 from raboof/nixpkgs-document-new-maintainer-convention
Document conventions around adding new maintainers
2020-11-11 09:01:31 -05:00
Arnout Engelen
292de46c5b
Document conventions around adding new maintainers
Adding them to `maintainers/maintainer-list` in a separate commit.

Co-Authored-By: Pavol Rusnak <pavol@rusnak.io>
Co-Authored-By: Atemu <atemu.main@gmail.com>
Co-Authored-By: Kevin Cox <kevincox@kevincox.ca>
2020-11-11 14:07:20 +01:00
Vladimír Čunát
89023c38fc
Recover the complicated situation after my bad merge
I made a mistake merge.  Reverting it in c778945806 undid the state
on master, but now I realize it crippled the git merge mechanism.
As the merge contained a mix of commits from `master..staging-next`
and other commits from `staging-next..staging`, it got the
`staging-next` branch into a state that was difficult to recover.

I reconstructed the "desired" state of staging-next tree by:
 - checking out the last commit of the problematic range: 4effe769e2
 - `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken
   merge commit and its revert from that range (while keeping
   reapplication from 4effe769e2)
 - merging the last unaffected staging-next commit (803ca85c20)
 - fortunately no other commits have been pushed to staging-next yet
 - applying a diff on staging-next to get it into that state
2020-10-26 09:01:04 +01:00
Vladimír Čunát
c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
Lily Ballard
7e1e8543fc installShellFiles: Enhance installShellCompletion
Teach installShellCompletion how to install completions from a named
pipe. Also add a convenience flag `--cmd NAME` that synthesizes the name
for each completion instead of requiring repeated `--name` flags.

Usage looks something like

    installShellCompletion --cmd foobar \
      --bash <($out/bin/foobar --bash-completion) \
      --fish <($out/bin/foobar --fish-completion) \
      --zsh <($out/bin/foobar --zsh-completion)

Fixes #83284
2020-10-08 15:08:40 -07:00
Frederik Rietdijk
692d219a93 Merge staging-next into staging 2020-10-06 10:25:58 +02:00
Jan Tojnar
32b4375f10
Merge branch 'staging-next' into staging 2020-09-29 00:12:29 +02:00
Doron Behar
f1d01c9d58
Merge pull request #93332 from wamserma/docs-remove-replace-link
docs.stdenv: remove reference to replace tool
2020-09-26 19:20:46 +03:00
Jan Tojnar
d471c5d1f3
Merge branch 'staging-next' into staging 2020-09-24 23:09:00 +02:00
Jan Tojnar
e1af37634b
doc: Improve code listings
By adding prompts and removing unnecessary indentation.
2020-09-23 01:25:25 +02:00
Robert Helgesson
fbc5093649
hooks: add moveSystemdUserUnitsHook
This hook moves systemd user service file from `lib/systemd/user` to
`share/systemd/user`. This is to allow systemd to find the user
services when installed into a user profile. The `lib/systemd/user`
path does not work since `lib` is not in `XDG_DATA_DIRS`.
2020-09-12 18:29:46 +02:00
Silvan Mosberger
560bb92473
Merge pull request #76794 from dudebout/document-nix-env-multiple-output-install-bug
document nix-env bug relating to multiple output installation
2020-09-05 15:40:26 +02:00
Nicolas Dudebout
611258f063 document nix-env bug relating to multiple output installation 2020-09-05 05:31:54 -04:00
Jan Tojnar
3f2b7beaf3
doc: Add anchors to stdenv variables
Wanted to link them.
2020-08-15 17:55:30 +02:00
Jan Tojnar
fb7507d068
Merge pull request #92348 from jtojnar/explicit-only-gpl
licenses: Make single-version-only GPL explicit
2020-07-18 06:48:41 +02:00
Markus S. Wamser
92ad9e9dc4 docs.stdenv: remove reference to replace tool 2020-07-17 08:21:09 +02:00
Jan Tojnar
13b5ae55cd
licenses: Make single-version-only GPL explicit
I commonly see people use the former when they should use the latter.

Would be also in line with the SPDX change https://www.gnu.org/licenses/identify-licenses-clearly.html
2020-07-05 17:51:30 +02:00
DavHau
c8c09b7dda add autoPatchelfIgnoreMissingDeps to auto-patchelf.sh 2020-06-22 10:41:35 +02:00
zowoq
c3a05f90ed doc/stdenv: fix build
https://hydra.nixos.org/build/128037886/nixlog/1/tail
error: element "variable" not allowed anywhere
2020-10-03 18:49:10 +10:00
Jan Tojnar
74c5472090
Merge pull request #98304 from jtojnar/updateScript-commit3
maintainers/scripts/update.nix: Add support for auto-commiting changes
2020-10-02 06:16:09 +02:00
Jan Tojnar
0c5ddf3358
maintainers/scripts/update.nix: run update script with UPDATE_NIX_ATTR_PATH
The environment variable will contain the attribute path the script is supposed to update.
2020-09-20 20:12:33 +02:00
Jan Tojnar
c1b05442ff
doc: Undocument attr-set of passthru.updateScript
We no longer need it for most use cases so I am making it experimental.

I have something in mind where it might be useful in the future (customizing commit messages)
but for now, it would only confuse people.
2020-09-20 20:12:32 +02:00
Jan Tojnar
c21a85c6a0
maintainers/scripts/update.nix: auto-detect attrPath 2020-09-20 20:11:46 +02:00
Jan Tojnar
b828285933
maintainers/scripts/update.nix: support filling in auto-commit attributes
We can determine all of them when attrPath is present so we might jsut as well do it.
2020-09-20 20:11:46 +02:00
Jan Tojnar
4a161ddb3b
maintainers/scripts/update.nix: support auto-committing by passing attrPath
Instead of having the updateScript support returning JSON object,
it should be sufficient to specify attrPath in passthru.updateScript.
It is much easier to use.

The former is now considered experimental.
2020-09-20 20:11:46 +02:00
Jan Tojnar
1efc042d92
maintainers/scripts/update.nix: Add support for auto-commiting changes
Update scripts can now declare features using

	passthru.updateScript = {
	  command = [ ../../update.sh pname ];
	  supportedFeatures = [ "commit" ];
	};

A `commit` feature means that when the update script finishes successfully,
it will print a JSON list like the following:

	[
	  {
	    "attrPath": "volume_key",
	    "oldVersion": "0.3.11",
	    "newVersion": "0.3.12",
	    "files": [
	      "/path/to/nixpkgs/pkgs/development/libraries/volume-key/default.nix"
	    ]
	  }
	]

and data from that will be used when update.nix is run with --argstr commit true
to create commits.

We will create a new git worktree for each thread in the pool and run the update
script there. Then we will commit the change and cherry pick it in the main repo,
releasing the worktree for a next change.
2020-09-20 20:11:22 +02:00
Benjamin Hipple
4af635feff
Merge pull request #87866 from danieldk/validate-pkgconfig-hook
validatePkgConfig: init
2020-06-02 23:27:27 -04:00
Jan Tojnar
55e7f95265
doc/stdenv: improve autoPatchelfHook description
* Add id
* Mention rpath
* The control variables do not really have to be env vars (though without structuredAttrs there is not a difference)
2020-06-01 07:21:48 +02:00
Daniël de Kok
13083b1a01 validatePkgConfig: init
This adds the `validatePkgConfig` hook, which can be used to validate
pkg-config files in the output(s). Currently, this will just run
`pkg-config --validate` on all `.pc` files, capturing errors such as
the issue that was fixed in #87789.

The hook could be extended in the future with more fine-grained
checks.
2020-05-31 20:45:03 +02:00
Eelco Dolstra
2e1e115472 Remove outdated reference to nix-log2xml 2020-05-07 16:01:29 +02:00
John Ericson
1ea80c2cc3 Merge remote-tracking branch 'upstream/master' into staging 2020-04-18 15:40:49 -04:00
Pavol Rusnak
fadcfc3ea4
treewide: per RFC45, remove more unquoted URLs 2020-04-18 14:04:37 +02:00
Jan Tojnar
4b706490da
Merge branch 'staging-next' into staging 2020-04-16 10:10:38 +02:00
worldofpeace
5384d72885 setup.sh: add dontPatch
Fixes #85038
2020-04-12 07:04:35 -04:00
Greg Price
53d61f91d2 doc/stdenv: Update default for stripDebugList.
This has changed a few times from 2008 to 2012: cdc74e167, d9213df2c,
and 095db9fe3.
2020-04-06 21:26:52 -07:00
Jakub Kądziołka
2c40ba774d
patchelf: Fix homepage URL
Since this commit on nixos-homepage, the homepage was 404-ing:
179733c176
2020-04-06 14:08:11 +02:00
Jonathan Ringer
3990b914c3 manual: use quoted homepage urls 2020-02-16 09:49:12 -08:00
Vladimír Čunát
79210713e6
nixpkgs manual: fix a typo in cross-compilation
I can't say I really understand that much about our cross stuff,
but this seems very clear.
2020-02-10 16:58:50 +01:00
Marc Busqué
9c68888e2e doc/stdenv: Add docs for 'dontInstall' variable 2019-11-28 17:07:07 +01:00
Josef Kemetmüller
060c3311bc doc: Remove improper use of backticks 2019-11-26 21:46:07 +01:00
Arnout Engelen
07c84f4de2 documentation: drop double 'the' 2019-11-09 10:10:47 +01:00
Frederik Rietdijk
680f6238bd nixpkgs manual: move stdenv chapters into one folder 2019-10-30 11:17:14 +01:00