Commit graph

15161 commits

Author SHA1 Message Date
Théophane Hufschmitt
b3433099d4
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-09-25 09:56:49 +02:00
Maximilian Bosch
89e5e68799
doc/hacking: fix make target to build the docs (#9033)
Was confused why `make html` didn't work while working on #9032, but
then I realized that after this section was written, the target was
renamed to `manual-html` in 6910f5dcb6.
2023-09-24 20:28:34 +02:00
Yingchi Long
e4b83fbfe2 libexpr: const rvalue reference -> value for nix::Expr nodes 2023-09-24 14:54:41 +08:00
John Ericson
9f93972c4d manual / manpages: Make option category names a proper subheader
Before they were an "ad-hoc" header with bold and a colon; now they are
a proper subheader.

For the man pages, this doesn't make much of a difference, but it will
help more on for the HTML manual, where things can be restyled. Again,
good separation of content vs presentation.
2023-09-23 00:37:44 -04:00
John Ericson
1d9fd3a6f8 manual / manpages: Adjust option filter filtering, move from C++ to Nix
Behavior change:

Before we only showed uption if the command-specific options were
non-empty. But that is somewhat odd since we also show common options.
Now, we do everything based on the union of both sorts of options (with
hidden-categories filtered, as before).

Implementation change:

The JSON dumping once again includes all options; the filtering of
hidden categories is done in the Nix instead. This is better separation
of "content" vs "presentation", and prepare the way for the HTML manual
vs manpages / `--help` doing different things.
2023-09-23 00:34:51 -04:00
John Ericson
9c640c1229 doc: showOptions: Simplify code with builtins.groupBy
This makes grouping options by category much nicer. No behavior should
be changed.
2023-09-23 00:28:16 -04:00
John Ericson
694810ba34 doc: showOptions: Move union to caller
`showOptions` itself doesn't care, so it shouldn't take two separate
arguments.
2023-09-22 23:54:04 -04:00
John Ericson
f2e201fbdb Expose RestoreSink in header (fs-sink.hh)
Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com>
Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com>
2023-09-22 09:11:29 -04:00
John Ericson
8a416e819c Move RestoreSink to fs-sink.cc
Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com>
Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com>
2023-09-22 09:10:32 -04:00
John Ericson
9d6114313b Move ParseSink to its own header
We will soon add a new implemenation so the one for NARs in `archive.cc`
isn't the only one.

Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com>
Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com>
2023-09-22 09:10:32 -04:00
John Ericson
39ba81a4eb Improve internal API docs for two file hashing functions
Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com>
Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com>
2023-09-22 09:10:32 -04:00
Théophane Hufschmitt
f89b84919c
Merge pull request #8931 from fricklerhandwerk/nix3-config-options
do not show configuration override flags for each command
2023-09-22 14:13:51 +02:00
Rasmus Rendal
3411507696 Document the percent-encoding mechanism 2023-09-22 10:07:14 +02:00
Théophane Hufschmitt
e8113747e1 Split the parseFlakeRefWithFragment function
Was starting to be very complex and hard to follow.
Now the different cases should be easier to understand.
2023-09-22 10:06:43 +02:00
Théophane Hufschmitt
50e61f579c Allow special characters in flake paths
Support using nix flakes in paths with spaces or abitrary unicode characters.
This introduces the convention that the path part of the URL should be
percent-encoded when dealing with `path:` urls and not when using
filepaths (following the convention of firefox).

Co-authored-by: Rendal <rasmus@rend.al>
2023-09-22 10:06:43 +02:00
Rasmus Rendal
d8cebae939 Add a test for flake paths with spaces in them 2023-09-22 10:06:43 +02:00
Gerg-L
f264d9ff08
flake: complete update to 23.05 2023-09-21 21:00:53 -04:00
Valentin Gagarin
1b560ea502
more detail on backports
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-09-21 23:23:14 +02:00
John Ericson
2d2aff5b92
Merge pull request #9016 from fricklerhandwerk/contributing-readme
README: link to CONTRIBUTING
2023-09-21 12:43:17 -04:00
John Ericson
6b6cfec8a5
Merge pull request #8990 from fricklerhandwerk/example-nix-env-install-outputs
add clarifying example to `nix-env` output selection
2023-09-21 12:27:35 -04:00
John Ericson
914cc7dc02
Merge pull request #9018 from fricklerhandwerk/readme-irc
remove IRC from links in README
2023-09-21 12:00:21 -04:00
John Ericson
fd61799c0b
Merge pull request #9006 from fricklerhandwerk/fix-links
fix links to configuration settings
2023-09-21 11:58:07 -04:00
John Ericson
0273ad73fa
Merge pull request #9012 from fricklerhandwerk/fix-multiline-doc
fix rendering error for consecutive spaces
2023-09-21 11:57:39 -04:00
John Ericson
7bafcdba79
Merge pull request #9013 from fricklerhandwerk/test-coverage-docs
Move test coverage section to testing page
2023-09-21 11:50:04 -04:00
Robert Hensing
89a604a6b6
Merge pull request #9021 from fricklerhandwerk/settings-docstring
fix typo in docstring
2023-09-21 13:20:13 +02:00
Robert Hensing
fb1c22df94
Merge pull request #9019 from fricklerhandwerk/doc-delete-unused
delete unused files
2023-09-21 13:16:03 +02:00
Valentin Gagarin
1a412a8d78 fix typo in docstring 2023-09-21 11:38:13 +02:00
Valentin Gagarin
cf6ba7256f delete unused files 2023-09-21 02:57:00 +02:00
Valentin Gagarin
984bd4cb0e README: link to CONTRIBUTING 2023-09-21 02:53:36 +02:00
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