Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into optimize-fetchToStore
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed May 8, 2024
2 parents 8d08846 + 52ccaf7 commit 295cd2d
Show file tree
Hide file tree
Showing 195 changed files with 2,893 additions and 1,599 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ result-*
.vscode/
.idea/

.pre-commit-config.yaml

# clangd and possibly more
.cache/

Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.22.0
2.23.0
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Check out the [security policy](https://github.com/NixOS/nix/security/policy).
1. Search for related issues that cover what you're going to work on.
It could help to mention there that you will work on the issue.

We strongly recommend first-time contributors not to propose new features but rather fix tightly-scoped problems in order to build trust and a working relationship with maintainers.

Issues labeled [good first issue](https://github.com/NixOS/nix/labels/good%20first%20issue) should be relatively easy to fix and are likely to get merged quickly.
Pull requests addressing issues labeled [idea approved](https://github.com/NixOS/nix/labels/idea%20approved) or [RFC](https://github.com/NixOS/nix/labels/RFC) are especially welcomed by maintainers and will receive prioritised review.

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ makefiles = \
ifdef HOST_UNIX
makefiles += \
scripts/local.mk \
maintainers/local.mk \
misc/bash/local.mk \
misc/fish/local.mk \
misc/zsh/local.mk \
Expand Down
12 changes: 11 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ AC_SYS_LARGEFILE


# Solaris-specific stuff.
AC_STRUCT_DIRENT_D_TYPE
case "$host_os" in
solaris*)
# Solaris requires -lsocket -lnsl for network functions
Expand Down Expand Up @@ -317,6 +316,17 @@ case "$host_os" in
[CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
have_seccomp=1
AC_DEFINE([HAVE_SECCOMP], [1], [Whether seccomp is available and should be used for sandboxing.])
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
#include <seccomp.h>
#ifndef __SNR_fchmodat2
# error "Missing support for fchmodat2"
#endif
]])
], [], [
echo "libseccomp is missing __SNR_fchmodat2. Please provide libseccomp 2.5.5 or later"
exit 1
])
else
have_seccomp=
fi
Expand Down
2 changes: 1 addition & 1 deletion doc/external-api/local.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(docdir)/external-api/html/index.html $(docdir)/external-api/latex: $(d)/doxygen.cfg
$(docdir)/external-api/html/index.html $(docdir)/external-api/latex: $(d)/doxygen.cfg src/lib*-c/*.h
mkdir -p $(docdir)/external-api
{ cat $< ; echo "OUTPUT_DIRECTORY=$(docdir)/external-api" ; } | doxygen -

Expand Down
2 changes: 1 addition & 1 deletion doc/internal-api/local.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(docdir)/internal-api/html/index.html $(docdir)/internal-api/latex: $(d)/doxygen.cfg
$(docdir)/internal-api/html/index.html $(docdir)/internal-api/latex: $(d)/doxygen.cfg src/**/*.hh
mkdir -p $(docdir)/internal-api
{ cat $< ; echo "OUTPUT_DIRECTORY=$(docdir)/internal-api" ; } | doxygen -

Expand Down
13 changes: 0 additions & 13 deletions doc/manual/rl-next/nix-eval-derivations.md

This file was deleted.

8 changes: 0 additions & 8 deletions doc/manual/rl-next/remove-repl-flake.md

This file was deleted.

2 changes: 2 additions & 0 deletions doc/manual/src/SUMMARY.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
- [Store Path Specification](protocols/store-path.md)
- [Nix Archive (NAR) Format](protocols/nix-archive.md)
- [Derivation "ATerm" file format](protocols/derivation-aterm.md)
- [C API](c-api.md)
- [Glossary](glossary.md)
- [Contributing](contributing/index.md)
- [Hacking](contributing/hacking.md)
Expand All @@ -122,6 +123,7 @@
- [C++ style guide](contributing/cxx.md)
- [Releases](release-notes/index.md)
{{#include ./SUMMARY-rl-next.md}}
- [Release 2.22 (2024-04-23)](release-notes/rl-2.22.md)
- [Release 2.21 (2024-03-11)](release-notes/rl-2.21.md)
- [Release 2.20 (2024-01-29)](release-notes/rl-2.20.md)
- [Release 2.19 (2023-11-17)](release-notes/rl-2.19.md)
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/src/advanced-topics/distributed-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ machine is accessible via SSH and that it has Nix installed. You can
test whether connecting to the remote Nix instance works, e.g.

```console
$ nix store info --store ssh://mac
$ nix store ping --store ssh://mac
```

will try to connect to the machine named `mac`. It is possible to
specify an SSH identity file as part of the remote store URI, e.g.

```console
$ nix store info --store ssh://mac?ssh-key=/home/alice/my-key
$ nix store ping --store ssh://mac?ssh-key=/home/alice/my-key
```

Since builds should be non-interactive, the key should not have a
Expand Down
16 changes: 16 additions & 0 deletions doc/manual/src/c-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# C API

Nix provides a C API with the intent of [_becoming_](https://github.com/NixOS/nix/milestone/52) a stable API, which it is currently not.
It is in development.

See:
- C API documentation for a recent build of master
- [Getting Started]
- [Index]
- [Matrix Room *Nix Bindings*](https://matrix.to/#/#nix-bindings:nixos.org) for discussion and questions.
- [Stabilisation Milestone](https://github.com/NixOS/nix/milestone/52)
- [Other C API PRs and issues](https://github.com/NixOS/nix/labels/c%20api)
- [Contributing C API Documentation](contributing/documentation.md#c-api-documentation), including how to build it locally.

[Getting Started]: https://hydra.nixos.org/job/nix/master/external-api-docs/latest/download-by-type/doc/external-api-docs
[Index]: https://hydra.nixos.org/job/nix/master/external-api-docs/latest/download-by-type/doc/external-api-docs/globals.html
2 changes: 1 addition & 1 deletion doc/manual/src/command-ref/nix-env/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The arguments *args* map to store paths in a number of possible ways:
Show the attribute paths of available packages with [`nix-env --query`](./query.md):

```console
nix-env --query --available --attr-path`
nix-env --query --available --attr-path
```

- If `--from-profile` *path* is given, *args* is a set of names
Expand Down
3 changes: 2 additions & 1 deletion doc/manual/src/contributing/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ or inside `nix-shell` or `nix develop`:
# xdg-open ./outputs/doc/share/doc/nix/internal-api/html/index.html
```

## C API documentation (experimental)
## C API documentation

Note that the C API is not yet stable.
[C API documentation] is available online.
You can also build and view it yourself:

Expand Down
23 changes: 23 additions & 0 deletions doc/manual/src/contributing/hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,29 @@ Configure your editor to use the `clangd` from the `.#native-clangStdenvPackages
> Some other editors (e.g. Emacs, Vim) need a plugin to support LSP servers in general (e.g. [lsp-mode](https://github.com/emacs-lsp/lsp-mode) for Emacs and [vim-lsp](https://github.com/prabirshrestha/vim-lsp) for vim).
> Editor-specific setup is typically opinionated, so we will not cover it here in more detail.
## Formatting and pre-commit hooks

You may run the formatters as a one-off using:

```console
make format
```

If you'd like to run the formatters before every commit, install the hooks:

```
pre-commit-hooks-install
```

This installs [pre-commit](https://pre-commit.com) using [cachix/git-hooks.nix](https://github.com/cachix/git-hooks.nix).

When making a commit, pay attention to the console output.
If it fails, run `git add --patch` to approve the suggestions _and commit again_.

To refresh pre-commit hook's config file, do the following:
1. Exit the development shell and start it again by running `nix develop`.
2. If you also use the pre-commit hook, also run `pre-commit-hooks-install` again.

## Add a release note

`doc/manual/rl-next` contains release notes entries for all unreleased changes.
Expand Down
19 changes: 19 additions & 0 deletions doc/manual/src/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,25 @@
[path]: ./language/values.md#type-path
[attribute name]: ./language/values.md#attribute-set

- [base directory]{#gloss-base-directory}

The location from which relative paths are resolved.

- For expressions in a file, the base directory is the directory containing that file.
This is analogous to the directory of a [base URL](https://datatracker.ietf.org/doc/html/rfc1808#section-3.3).
<!-- which is sufficient for resolving non-empty URLs -->

<!--
The wording here may look awkward, but it's for these reasons:
* "with --expr": it's a flag, and not an option with an accompanying value
* "written in": the expression itself must be written as an argument,
whereas the more natural "passed as an argument" allows an interpretation
where the expression could be passed by file name.
-->
- For expressions written in command line arguments with [`--expr`](@docroot@/command-ref/opt-common.html#opt-expr), the base directory is the current working directory.

[base directory]: #gloss-base-directory

- [experimental feature]{#gloss-experimental-feature}

Not yet stabilized functionality guarded by named experimental feature flags.
Expand Down
3 changes: 2 additions & 1 deletion doc/manual/src/installation/env-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ ssl-cert-file = /etc/ssl/my-certificate-bundle.crt

The Nix installer has special handling for these proxy-related
environment variables: `http_proxy`, `https_proxy`, `ftp_proxy`,
`no_proxy`, `HTTP_PROXY`, `HTTPS_PROXY`, `FTP_PROXY`, `NO_PROXY`.
`all_proxy`, `no_proxy`, `HTTP_PROXY`, `HTTPS_PROXY`, `FTP_PROXY`,
`ALL_PROXY`, `NO_PROXY`.

If any of these variables are set when running the Nix installer, then
the installer will create an override file at
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/src/installation/installing-binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Supported systems:
To explicitly instruct the installer to perform a multi-user installation on your system:

```console
$ curl -L https://nixos.org/nix/install | sh -s -- --daemon
$ bash <(curl -L https://nixos.org/nix/install) --daemon
```

You can run this under your usual user account or `root`.
Expand All @@ -61,7 +61,7 @@ The script will invoke `sudo` as needed.
To explicitly select a single-user installation on your system:

```console
$ curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
$ bash <(curl -L https://nixos.org/nix/install) --no-daemon
```

In a single-user installation, `/nix` is owned by the invoking user.
Expand Down
Loading

0 comments on commit 295cd2d

Please sign in to comment.