Commit graph

15132 commits

Author SHA1 Message Date
Valentin Gagarin
8e25450ff4 refer to nix.dev for installation instructions
there are currently multiple places with installation instructions that
all have to be updated when a change to any of them is accepted.

this reduces the number of places by one, and directs beginners to the
maintained and curated resource for Nix learning materials.
2023-09-21 02:53:11 +02:00
Valentin Gagarin
4685260a77 fix links to configuration settings 2023-09-21 02:52:58 +02:00
Valentin Gagarin
02649d247b move test coverage section to testing page 2023-09-21 02:52:28 +02:00
Valentin Gagarin
954890a42f add information on release cycle and backports 2023-09-21 02:52:05 +02:00
Valentin Gagarin
747b2baf21 fix rendering error for consecutive spaces 2023-09-21 02:51:54 +02:00
Valentin Gagarin
e0e5943db2 remove IRC from links in README
the community has moved away from IRC a long time ago
2023-09-21 02:51:39 +02:00
Eelco Dolstra
3ce793d3e9
Merge pull request #9008 from cole-h/re-enable-nspawn-test
Re-enable systemd-nspawn test
2023-09-20 19:03:13 +02:00
Cole Helbling
883092e3f7 Re-enable systemd-nspawn test
It was disabled in c6953d1ff6 because
a recent Nixpkgs bump brought in a new systemd which changed how
systemd-nspawn worked.

As far as I can tell, the issue was caused by this upstream systemd
commit:
b71a0192c0

Bind-mounting the host's `/sys` and `/proc` into the container's
`/run/host/{sys,proc}` fixes the issue and allows the test to succeed.
2023-09-20 09:09:01 -07:00
Eelco Dolstra
d3f866cf11
Merge pull request #9003 from NixOS/bump-2.19.0
Bump version
2023-09-20 16:09:37 +02:00
Eelco Dolstra
b7acef1ceb Bump version 2023-09-20 15:21:21 +02:00
John Ericson
c18911602e Fix boehmgc-coroutine-sp-fallback.diff for FreeBSD
Our FreeBSD headers have `pthread_getattr_np`, but we get a link-time
error that is missing. The good news is that there is another similar
function which does exist, and the upstream project elsewhere does just
the [fallback code] we need.

As the fallback code indicates, the two functions are not identical
however as the other one needs explicit initialization. NetBSD supports
both in fact, and its [manpage] is therefore a good
resource on what the differences are.

[fallback code]: 07a6d0ee88/os_dep.c (L1266-L1272)

[manpage]: https://man.netbsd.org/pthread_attr_get_np.3
2023-09-20 09:04:42 -04:00
John Ericson
7f76d7f038 Rename an identifier of ours called stdout
This is a reserved identifier on NetBSD --- it is replaced by a macro on
that platform --- and so we cannot use it.
2023-09-20 09:04:42 -04:00
John Ericson
0db251e4ad Do not build docs in cross devShell
Coppied from the main build; we really should deduplicate this more.
2023-09-20 09:04:42 -04:00
John Ericson
564392b57b Make libsodium an unconditional dependency
The configure script will not tolerate it being missing.
2023-09-20 09:04:42 -04:00
John Ericson
28850ee900 Make dev shells work for cross
Need to get tools from right package set. Could build clang tools but I
don't want to wait :D.
2023-09-20 09:04:42 -04:00
John Ericson
e44d2a6bbe Add FreeBSD and NetBSD cross to Nix's flake 2023-09-20 09:04:42 -04:00
Eelco Dolstra
d40e91440d
Merge pull request #9002 from NixOS/release-notes
Release notes
2023-09-20 12:41:30 +02:00
Eelco Dolstra
10ad052f7d Release notes 2023-09-20 11:42:49 +02:00
Eelco Dolstra
a4a7eca679
Merge pull request #8991 from NixOS/dependabot/github_actions/docker/login-action-3
Bump docker/login-action from 2 to 3
2023-09-20 11:37:36 +02:00
Eelco Dolstra
6ce358b13c
Merge pull request #8569 from vcunat/p/flake-update
flake: update nixpkgs: 22.11 -> 23.05
2023-09-20 11:30:55 +02:00
Eelco Dolstra
b6b2a0aea9 Use "touch -h"
https://hydra.nixos.org/build/235888160

This is needed because Nixpkgs now contains dangling symlinks
(pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/pkgs/by-name/fo/foo/foo.nix).
2023-09-19 17:21:07 +02:00
Eelco Dolstra
c6953d1ff6 Disable systemd-nspawn test
This is broken because of a change in systemd in NixOS 23.05. It fails
with

  Failed to mount proc (type proc) on /proc (MS_NOSUID|MS_NODEV|MS_NOEXEC ""): Operation not permitted
2023-09-19 17:03:21 +02:00
Eelco Dolstra
126e2645f2 Disable rapidcheck tests in the coverage run
https://hydra.nixos.org/build/233688539
2023-09-19 16:04:00 +02:00
Eelco Dolstra
c8afa01bc2 Try aws-sdk-cpp fix 2023-09-19 14:51:50 +02:00
Eelco Dolstra
c451b48993 Merge remote-tracking branch 'origin/master' into p/flake-update 2023-09-19 13:33:56 +02:00
dependabot[bot]
dd3bf4dbda
Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 22:16:55 +00:00
Valentin Gagarin
408055a9dd add clarifying example to nix-env output selection
there is a very confusing warning in the Nixpkgs manual that
mischaracterises `nix-env` behavior, and this example shows what's
really happening.

note that it doesn't use `pkgs.runCommand` or other `pkgs.stdenv`
facilities, as deep down those set `meta.outputsToInstall` to very
particular defaults that do not generally apply to Nix.
2023-09-18 20:11:42 +02:00
Théophane Hufschmitt
2a52ec4e92
Merge pull request #7661 from henrik-ch/repl-doc
improved help command listing.
2023-09-14 16:43:02 +02:00
Théophane Hufschmitt
b99fdcf8db
Merge pull request #8959 from maralorn/print-parent
Print parent activity field in json log
2023-09-13 11:41:47 +02:00
Emil Nikolov
21783cff16
docs: make the nix develop --command example unambiguous (#8952) 2023-09-12 17:15:36 +02:00
Robert Hensing
bf8deb4991 Expr: remove redundant int and float fields 2023-09-12 13:45:45 +02:00
Robert Hensing
3720e811fa libexpr: Add nrExprs to NIX_SHOW_STATS 2023-09-12 13:21:55 +02:00
John Ericson
d98337d18f
Merge pull request #8962 from mkenigs/dead-code
Drop dead code
2023-09-11 10:03:32 -07:00
Matthew Kenigsberg
07545add53
Drop dead code
localPath is unused
2023-09-10 12:18:03 +02:00
maralorn
682dbcab9a
Print parent activity field in json log 2023-09-09 18:01:10 +02:00
Emil Nikolov
2cdc9c32e7
docs: fixed the default priority of nix-env --install (#8945) 2023-09-09 06:54:39 +00:00
thenbe
5473e10249
fix: nix shell multiple commands example (#8950)
The `-c` flag belongs to `sh` not `nix shell`. As it stands, the command errors with:

```
$ nix shell nixpkgs#gnumake --command sh --command "cd src && make"
sh: --command: invalid option
```

https://github.com/NixOS/nix/pull/8276 was good for readability, but it missed this since that PR used a find/replace script.
2023-09-07 22:25:32 +00:00
Robert Hensing
5f55c33917
Merge pull request #8944 from fricklerhandwerk/fix-anchor
fix invalid anchor link
2023-09-07 17:58:16 +02:00
Robert Hensing
e34493a70e
Merge pull request #4628 from obsidiansystems/dynamic-drvs
Dynamic derivations RFC 92
2023-09-07 17:33:02 +02:00
John Ericson
37d6fff113
Merge pull request #8938 from obsidiansystems/better-drv-parsing
Improve derivation parsing
2023-09-07 11:07:02 -04:00
John Ericson
80d7994f52 Special-case error message to add extra information
The Derivation parser and old ATerm unfortunately leaves few ways to get
nice errors when an old version of Nix encounters a new version of the
format. The most likely scenario for this to occur is with a new client
making a derivation that the old daemon it is communicating with cannot
understand.

The extensions we just created for dynamic derivation deps will add a
version field, solving the problem going forward, but there is still the
issue of what to do about old versions of Nix up to now.

The solution here is to carefully catch the bad error from the daemon
that is likely to indicate this problem, and add some extra context to
it.

There is another "Ugly backwards compatibility hack" in
`remote-store.cc` that also works by transforming an error.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-09-07 10:39:37 -04:00
John Ericson
7ad66cb3ef Allow dynamic derivation deps in inputDrvs
We use the same nested map representation we used for goals, again in
order to save space. We might someday want to combine with `inputDrvs`,
by doing `V = bool` instead of `V = std::set<OutputName>`, but we are
not doing that yet for sake of a smaller diff.

The ATerm format for Derivations also needs to be extended, in addition
to the in-memory format. To accomodate this, we added a new basic
versioning scheme, so old versions of Nix will get nice errors. (And
going forward, if the ATerm format changes again the errors will be even
better.)

`parsedStrings`, an internal function used as part of parsing
derivations in A-Term format, used to consume the final `]` but expect
the initial `[` to already be consumed. This made for what looked like
unbalanced brackets at callsites, which was confusing. Now it consumes
both which is hopefully less confusing.

As part of testing, we also created a unit test for the A-Term format for
regular non-experimental derivations too.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>

Apply suggestions from code review

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-09-07 10:39:37 -04:00
Valentin Gagarin
829d4d3e03 fix invalid anchor link 2023-09-07 15:13:22 +02:00
Valentin Gagarin
aa46f536e8 add note on overriding settings for stable commands 2023-09-07 02:02:27 +02:00
Valentin Gagarin
09eb7f1ef6 do not show configuration override flags for each command
this removes a lot of noise from the web search, which precludes finding
the actual documentation.

some configuration settings have enough documentation to warrant
individual pages, so the alternative of including full setting
documentation in each command page doesn't make much sense here.

this change technically means that the command line flags to override
settings are "invisible", and not exported as JSON. this may or may not
be desirable. a more explicit approach would be adding a `hidden` field
to the flag's JSON output, but would also require adjusting
post-processing of that JSON for manual rendering.
2023-09-07 02:02:27 +02:00
Valentin Gagarin
b0fe7f560d add missing link 2023-09-07 01:38:53 +02:00
Valentin Gagarin
589fd897fb add todo on store docs 2023-09-07 01:38:53 +02:00
John Ericson
b7edc2099f Improve derivation parsing
- Don't assert: Derivation ATerms are not necessarily produced by Nix,
  and parsers should always throw graceful errors

- Improve error message from `static void except(..)`, shows both what
  we expected and what we actually got.

The intention is that we backport it, and then hopefully a few people
might get slightly better errors if they try out new experimental drv
files (for RFC 92) with an old version of Nix.
2023-09-06 11:44:06 -04:00
John Ericson
3a62651bd6
Merge pull request #8933 from fricklerhandwerk/option-anchors
Add anchors to option listings
2023-09-06 09:39:33 -04:00
John Ericson
216c66ddcf
Merge pull request #8932 from fricklerhandwerk/formatting
dedent common options listing; one sentence per line
2023-09-06 09:30:25 -04:00