Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into tcp store branch #5

Open
wants to merge 2,965 commits into
base: tcp-store
Choose a base branch
from
Open
Changes from 126 commits
Commits
Show all changes
2965 commits
Select commit Hold shift + click to select a range
620e4fb
flake.nix: Add nixpkgs/lib/tests as regression test
roberth Jan 17, 2023
d385c13
Merge pull request #7621 from hercules-ci/nixpkgs-lib-regression-test
roberth Jan 18, 2023
3272a2d
maintainers: Document backporting quirk
roberth Jan 18, 2023
01f2683
Restore support for channel: URLs in fetchTarball
edolstra Jan 18, 2023
e3bb97d
Merge pull request #7598 from yangsheng6810/fix_env_escape
thufschmitt Jan 18, 2023
95cfd50
OutputSpec: Allow all valid output names
edolstra Jan 18, 2023
1ebfa6b
Add some tests for illegal output names
edolstra Jan 18, 2023
ee1372d
Merge pull request #7627 from edolstra/fetchTarball-channel
edolstra Jan 18, 2023
70e193d
Update binary-cache-substituter.md (#7628)
phip1611 Jan 18, 2023
8a3b308
Fix indentation
edolstra Jan 18, 2023
75c89c3
Add test for OutputsSpec::Names
edolstra Jan 18, 2023
0510aa4
Merge pull request #7631 from edolstra/output-names
edolstra Jan 18, 2023
913782a
Relase notes: add empty flake registry
asymmetric Jan 18, 2023
2513eba
Merge pull request #7636 from asymmetric/relnotes-flakre-reg
edolstra Jan 18, 2023
9141b74
Fix markdown error in operators.md
marceltransier Jan 18, 2023
8b9325e
Fix update operator usage in operators.md
marceltransier Jan 19, 2023
5a0865b
Merge pull request #7638 from marceltransier/patch-1
edolstra Jan 19, 2023
38b90c6
Merge pull request #7640 from marceltransier/patch-2
edolstra Jan 19, 2023
e4726a0
Revert "Revert "Merge pull request #6204 from layus/coerce-string""
layus Jan 19, 2023
ca7c5e0
Add tests for error traces, and fixes
layus Nov 28, 2022
6228b6b
Discuss re-entrant errors and design
layus Dec 20, 2022
a9fa2c7
Always display addErrorContext messages in (expanded) traces
layus Jan 19, 2023
9469b1b
doc: update language/index.md
phip1611 Jan 18, 2023
b911307
Merge pull request #7629 from phip1611/patch-3
fricklerhandwerk Jan 19, 2023
4d50995
Fix url parsing for urls using `file+`
typetetris Jan 20, 2023
fdc02d2
Merge pull request #7490 from fricklerhandwerk/doc-realise
thufschmitt Jan 20, 2023
ee4b849
Fix unreachable error message
layus Jan 20, 2023
a064230
Use complete '__toString' attribute name
layus Jan 20, 2023
4ff9ed5
doc: fix update operator description
fps Jan 20, 2023
e90d757
Merge pull request #7647 from fps/operator_doc
fricklerhandwerk Jan 20, 2023
7f04a54
Update .github/PULL_REQUEST_TEMPLATE.md
roberth Jan 20, 2023
dfbdde6
Update .github/PULL_REQUEST_TEMPLATE.md
roberth Jan 20, 2023
04de0dd
Merge pull request #7577 from hercules-ci/pr-template
roberth Jan 20, 2023
74026bb
tests: Move NixOS tests to tests/nixos
roberth Jan 20, 2023
261c256
Use the official, documented NixOS runTest interface
roberth Jan 20, 2023
3c08a3e
PR template: Specify path to integration tests
roberth Jan 20, 2023
88d8f6a
Expand tests to reproduce #7655
Ericson2314 Jan 22, 2023
0afdf40
Fix #7655
Ericson2314 Jan 22, 2023
153ee46
primop: add readFileType, optimize readDir
aakropotkin Jan 22, 2023
90e630a
Merge pull request #7641 from layus/coerce-strings-fixups
thufschmitt Jan 23, 2023
37c533e
rl-next.md: Minor improvement
roberth Jan 23, 2023
7fe308c
Add `rapidcheck` dependency for testing
Ericson2314 Jan 19, 2023
6853953
Better-scope `Store` forward declarations
Ericson2314 Jan 19, 2023
018e257
Test store paths, with property tests
Ericson2314 Jan 19, 2023
a58e9c3
Merge pull request #7639 from obsidiansystems/output-names
roberth Jan 23, 2023
0a9acef
Merge pull request #7657 from obsidiansystems/fix-7655
roberth Jan 23, 2023
9b56683
Merge pull request #7447 from aakropotkin/read-file-type
roberth Jan 23, 2023
f503ba1
Merge pull request #7595 from cole-h/show-setting-value
edolstra Jan 23, 2023
a91709a
Try to fix #7669
Ericson2314 Jan 23, 2023
57f9dca
Bump zeebe-io/backport-action from 1.0.1 to 1.1.0
dependabot[bot] Jan 23, 2023
dc4aa38
doc: fix anchor links in and to glossary
iFreilicht Jan 23, 2023
f587598
Tighten up the `exportReferencesGraph` tests
aciceri Nov 23, 2022
04cc7f9
Merge pull request #7675 from obsidiansystems/tighten-export-refs-test
roberth Jan 24, 2023
8dac9a4
Merge pull request #7671 from NixOS/dependabot/github_actions/zeebe-i…
edolstra Jan 24, 2023
3e1a4b1
Merge pull request #7670 from obsidiansystems/try-fix-7669
roberth Jan 24, 2023
d83479d
Merge pull request #7673 from iFreilicht/fix-glossary
edolstra Jan 24, 2023
0664ba0
Revert "fixup: remove boehmgc patch"
roberth Jan 24, 2023
8270dcc
Actually complete the revert
roberth Jan 24, 2023
46054f9
Update boehmgc-coroutine-sp-fallback.diff
roberth Jan 24, 2023
f233fd4
Merge pull request #7679 from hercules-ci/re-add-boehmgc-patch
roberth Jan 24, 2023
734c5fd
Fix 'destructor called on non-final ...' warning
layus Jan 24, 2023
189261c
Merge pull request #7681 from layus/virtual-destructor-warning
thufschmitt Jan 24, 2023
8160311
Fix the 2.13 changelog
Ericson2314 Jan 24, 2023
7589271
Fix the coverage job
Ericson2314 Jan 25, 2023
f465e37
Update doc/manual/src/release-notes/rl-2.13.md
Ericson2314 Jan 25, 2023
33263ee
Merge pull request #7686 from obsidiansystems/fix-coverage
edolstra Jan 25, 2023
aa61ae0
Merge pull request #7685 from obsidiansystems/fix-change-log
edolstra Jan 25, 2023
a96156c
warnings: enhance the case of untrusted substituter for untrusted user
Dec 14, 2022
64951d9
Update src/libstore/daemon.cc
rapenne-s Jan 3, 2023
6b2729c
improve documentation about substituters and trusted users
Jan 20, 2023
ed479aa
Merge pull request #7461 from rapenne-s/improve_messaging_untrusted_s…
thufschmitt Jan 26, 2023
ab424a3
Merge remote-tracking branch 'nixos/master' into pr-flake-show-foreign
Jan 27, 2023
79c084c
Add a test for `nix flake show`
Jan 27, 2023
1cba598
getDefaultNixPath: actually respect `{restrict,pure}-eval`
ncfavier Jan 25, 2023
ccaadc9
Merge pull request #7648 from hercules-ci/move-nixos-tests
thufschmitt Jan 27, 2023
dba9173
Document default `nix-path` value
ncfavier Jan 27, 2023
02e81cd
apply showAllSystems to legacyPackages as well
max-privatevoid Jan 27, 2023
6772e9e
Allow programs to have custom names
Ericson2314 Jan 29, 2023
ec0c0ef
Allow unit test infra to be reused across libs' tests
Ericson2314 Jan 29, 2023
ecd3e4e
More property tests
Ericson2314 Jan 29, 2023
d70b890
Merge pull request #7689 from ncfavier/nix-path-restrict-eval
thufschmitt Jan 30, 2023
4aaf0ee
Merge branch 'master' into referenceablePaths
thufschmitt Jan 30, 2023
7408776
Fix the release-notes
Jan 30, 2023
7cd08ae
Merge pull request #7645 from typetetris/fix-url-parsing-file-as-appl…
thufschmitt Jan 30, 2023
bc6e65e
Fix the flakes/show test
Jan 30, 2023
de1b593
Merge pull request #7087 from ncfavier/referenceablePaths
thufschmitt Jan 30, 2023
3ac9f16
Fix the flakes init test
Jan 30, 2023
575d0ae
Merge pull request #6988 from max-privatevoid/pr-flake-show-foreign
thufschmitt Jan 30, 2023
c79b158
Merge pull request #5226 from NixOS/client-side-profiles
edolstra Jan 30, 2023
0b3464a
doc: add `__structuredAttrs`, `outputChecks`, `unsafeDiscardReferences`
ncfavier Jan 30, 2023
f3e272b
Avoid some `StorePath` <-> `Path` round trips
Ericson2314 Jan 30, 2023
a31d7d4
Merge pull request #7715 from obsidiansystems/small-storePath-cleanups
roberth Jan 30, 2023
02e745b
Separate `path.hh` from `content-address.hh`
Ericson2314 Jan 30, 2023
560142f
Make per-variant Arbitrary impls too
Ericson2314 Jan 30, 2023
b26562c
InstallableFlake: Handle missing attr in getCursors
dramforever Jan 23, 2023
377d5eb
Installable::getCursors: Cleanup
dramforever Jan 30, 2023
6b779e4
Fix extra "." in CmdSearch::getDefaultFlakeAttrPaths
dramforever Jan 23, 2023
e21aa43
Delete dead code
Ericson2314 Jan 30, 2023
16fa8c2
Fix configure.ac rapidcheck tests
Ericson2314 Jan 30, 2023
c9b9260
Merge pull request #7713 from obsidiansystems/more-rapid-check
roberth Jan 30, 2023
c5d4c50
manual: Document that the store timestamp is now 1, not 0
andersk Jan 31, 2023
28648ed
nix store ping: add --json flag
yorickvP Jan 31, 2023
0079d29
Merge pull request #7714 from ncfavier/doc-structuredAttrs
thufschmitt Jan 31, 2023
4f4a607
nix store ping: try to print json if connect() fails aswell
yorickvP Jan 31, 2023
4757b3f
tests/store-ping: test nix store ping --json
yorickvP Jan 31, 2023
60d48ed
nix flake show: Ignore empty attrsets
roberth Jan 31, 2023
14b0b9e
Merge pull request #7203 from graham33/feature/cpp20
edolstra Feb 1, 2023
845b7f0
Merge pull request #7726 from hercules-ci/flake-show-when-empty-hide
edolstra Feb 1, 2023
6f0436a
Merge pull request #7719 from andersk/manual-timestamp
edolstra Feb 1, 2023
e32c5c2
Merge pull request #7667 from dramforever/flake-search-attr
thufschmitt Feb 1, 2023
ed9d7c8
Merge pull request #7718 from obsidiansystems/fix-rapidcheck-autoconf
edolstra Feb 1, 2023
b55a946
Merge pull request #7717 from obsidiansystems/delete-dead-code
edolstra Feb 1, 2023
518da6c
Merge pull request #7716 from obsidiansystems/small-storePath-cleanups
thufschmitt Feb 1, 2023
7a09bfb
Merge pull request #7723 from yorickvP/nix-store-ping-json
edolstra Feb 1, 2023
57a4258
Remove an unused capture
edolstra Feb 1, 2023
e8ca49f
Fix clang compilation
edolstra Feb 1, 2023
119ba50
Merge pull request #7733 from edolstra/clang-c++20
edolstra Feb 1, 2023
32ca596
nix-shell: Colour the prompt red if the user is root
Sciencentistguy Feb 1, 2023
92edc38
Don't send plugin-files to the daemon.
shlevy Feb 2, 2023
cde2e2a
Merge pull request #7734 from Sciencentistguy/root-red-ps1
thufschmitt Feb 2, 2023
895c525
daemon: Warn on old clients passing unexpected plugin-files.
shlevy Feb 2, 2023
b574c70
Merge pull request #7736 from shlevy/plugin-files-daemon
edolstra Feb 2, 2023
51013da
perl: run `initLibStore()` on `openStore()`
Ma27 Jan 28, 2023
5cbeff6
Merge pull request #7607 from Hoverbear/installation-expand
edolstra Feb 2, 2023
915876b
Merge remote-tracking branch 'upstream/master' into tcp-store
Ericson2314 Feb 2, 2023
479c011
Get rid of the `authHook` parameter on `processConnection`
Ericson2314 Feb 2, 2023
400197e
Merge branch 'delete-authHook' into tcp-store
Ericson2314 Feb 2, 2023
33e95b1
Make daemon auth code a little safer with `TcpAddr` struct
Ericson2314 Feb 2, 2023
a47e055
Move `trustedUsers` and `allowedUsers` to separate config struct
Ericson2314 Feb 2, 2023
1647354
Merge pull request #7738 from obsidiansystems/delete-authHook
edolstra Feb 3, 2023
dbe0748
Merge pull request #7739 from obsidiansystems/user-settings
edolstra Feb 3, 2023
f20d372
advertise transport encoding in http transfers to
Mic92 Jan 29, 2023
45fa297
Factor out `InstallableStorePath` to its own file, dedup
Ericson2314 Feb 3, 2023
895dfc6
Merge pull request #7705 from Ma27/fix-initNix-in-perl-bindings
roberth Feb 3, 2023
6352e20
Remove `--derivation` from test
Ericson2314 Feb 4, 2023
44bea52
Scope down `--derivation` to just the commands that use it
Ericson2314 Feb 4, 2023
b8e9635
fix `clang11Stdenv` dev shell documentation
peterbecich Feb 5, 2023
3050005
build-remote: don't warn when all local build slots are taken
yorickvP Feb 6, 2023
6fdce7a
Bump cachix/install-nix-action from 18 to 19
dependabot[bot] Feb 6, 2023
9670cac
Backport PR title: Bot-based -> Automatic
fricklerhandwerk Feb 7, 2023
2915db7
doc: fixup 7714
ncfavier Feb 7, 2023
631ba64
build-remote: store maxBuildJobs before forcing it to 1
yorickvP Feb 7, 2023
c203942
add "instantiate" to glossary
fricklerhandwerk Jan 19, 2023
0d73313
Merge pull request #7318 from fricklerhandwerk/doc-instantiate
fricklerhandwerk Feb 7, 2023
16929b0
Merge pull request #7767 from NixOS/backport-pr-name
edolstra Feb 7, 2023
ffa9fee
Merge pull request #7766 from NixOS/dependabot/github_actions/cachix/…
edolstra Feb 7, 2023
81e75e4
Add some progress indication when fetching submodules
edolstra Feb 3, 2023
2edd5cf
Fix the origin URL used for fetching submodules
edolstra Feb 7, 2023
a8fe0dc
Speed up fetching submodules
edolstra Feb 7, 2023
8ab9fda
Merge pull request #7768 from ncfavier/fixup-7714
fricklerhandwerk Feb 7, 2023
72b18f0
Add a basic daemon authorization test
roberth Feb 7, 2023
7a6daf6
Fix activity message
edolstra Feb 7, 2023
1ba13b1
Merge pull request #7758 from peterbecich/clang11-devshell-documentation
edolstra Feb 7, 2023
9a7dc5d
Add some tests
edolstra Feb 7, 2023
0a82d2c
Ask release notes for incompatible changes, not bug fixes
edolstra Feb 7, 2023
fb2f7f5
Fix auto-uid-allocation in Docker containers
edolstra Jan 25, 2023
bc1d9fd
Check whether we can use PID namespaces
edolstra Jan 27, 2023
d834de2
Fix macOS build
edolstra Jan 27, 2023
4e61877
More #ifdef
edolstra Jan 27, 2023
c5c0617
Mention --no-sandbox if sandboxing is unsupported
edolstra Feb 7, 2023
0a70b41
Print debug message if a namespace test fails
edolstra Feb 7, 2023
32db5e6
docs: Fix broken anchor link
iFreilicht Jan 26, 2023
d910dfe
docs: Fix formatting of || operator
iFreilicht Jan 31, 2023
fd01b8f
Merge pull request #7780 from edolstra/pr-template
edolstra Feb 7, 2023
9aeaf98
Make install command in documentation compatible with fish shell (#7474)
doubledup Feb 7, 2023
1a86d3e
local.mk: Don't log docroot comments
roberth Jan 17, 2023
8a0ef5d
sqlite.cc: Add SQL tracing
roberth Jan 17, 2023
29f0b19
NarInfoDiskCache: Rename cacheExists -> upToDateCacheExists
roberth Jan 17, 2023
79f62d2
NarInfoDiskCacheImpl: Make dbPath a parameter
roberth Jan 30, 2023
2ceece3
NarInfoDiskCache: Prepare reproducer for #3898
roberth Jan 30, 2023
fb94d5c
NarInfoDiskCache: Keep BinaryCache.id stable and improve test
roberth Jan 17, 2023
19b495a
NarInfoDiskCache: Also test id consistency with updated fields
roberth Jan 31, 2023
ae6de01
Merge pull request #7692 from edolstra/fix-docker-auto-uid-allocation
edolstra Feb 7, 2023
c192151
Merge pull request #7700 from iFreilicht/patch-1
fricklerhandwerk Feb 7, 2023
40d8955
Apply suggestions from code review
roberth Feb 7, 2023
ec78896
Merge pull request #7626 from hercules-ci/issue-7623
fricklerhandwerk Feb 8, 2023
e4a2a5c
Documentation: builtins.fetchGit when used on a local path (#7706)
nomeata Feb 8, 2023
15313bf
Fix activity message
edolstra Feb 9, 2023
862e56c
Improve comment
edolstra Feb 9, 2023
e46429f
Merge pull request #7712 from Mic92/advertise-compressions
edolstra Feb 9, 2023
0a7071e
Merge pull request #7774 from edolstra/submodule-fixes
edolstra Feb 9, 2023
5597d68
Merge pull request #7754 from obsidiansystems/narrower-scope-derivati…
thufschmitt Feb 9, 2023
9813e54
tests: Add command source locations to test log
roberth Feb 9, 2023
a0f1cb0
Fix minor syntax issue in the one of the examples.
picogeyer Feb 10, 2023
012ddaa
flake.nix: add clangd and bear
yorickvP Nov 25, 2022
7908a41
tests/authorization: Simplify assertion
roberth Feb 10, 2023
320e391
Merge pull request #7403 from fricklerhandwerk/noselect
thufschmitt Feb 10, 2023
1a0b293
Merge pull request #7775 from hercules-ci/test-authorization
roberth Feb 10, 2023
f094ba7
Simplify the PID namespace check: just try to mount /proc
edolstra Feb 10, 2023
37b1e93
daemon.cc: Rename UserSettings -> AuthorizationSettings
roberth Feb 10, 2023
3e6e34c
LocalDerivationGoal::startBuilder(): Use startProcess() to clone
edolstra Feb 10, 2023
0c77dba
Merge pull request #7801 from hercules-ci/rename-authorizationsettings
edolstra Feb 10, 2023
c49b747
Fix macOS build
edolstra Feb 10, 2023
bffb762
Merge pull request #7800 from PicoGeyer/patch-1
edolstra Feb 10, 2023
2384d36
A setting to follow XDG Base Directory standard
balsoft Nov 17, 2021
a21405a
Add regression test
edolstra Feb 10, 2023
a537095
Infer short completion descriptions for commandline flags
pjungkamp Feb 10, 2023
9ebbe35
Merge pull request #5588 from tweag/balsoft/xdg
thufschmitt Feb 10, 2023
5978ceb
Fix building with GCC 9
edolstra Feb 10, 2023
67451d8
Merge pull request #7802 from edolstra/fix-7783
edolstra Feb 10, 2023
b3d29e8
Merge pull request #7805 from edolstra/c++2a
edolstra Feb 10, 2023
c184566
Merge pull request #7797 from hercules-ci/tests-set-ps4
edolstra Feb 10, 2023
30edd7a
Completions::add use libutil trim()
pjungkamp Feb 10, 2023
55016b6
Test `nix build --json` return output paths in floating CA case
Ericson2314 Mar 1, 2021
3d16f2a
parser: use implicit rule
Et7f3 Feb 12, 2023
fa89d31
ExprString: Avoid copy of string
Et7f3 Feb 10, 2023
f2e4279
Improve hacking.md
yorickvP Nov 25, 2022
2037f8a
Merge pull request #7804 from PJungkamp/fix-completions
edolstra Feb 13, 2023
c205d10
Merge pull request #7616 from hercules-ci/fix-3898
edolstra Feb 13, 2023
601faa0
Merge pull request #7744 from obsidiansystems/split-installable-store…
tomberek Feb 13, 2023
df9a71f
Merge pull request #4589 from obsidiansystems/better-build-ca-json
tomberek Feb 13, 2023
db41f74
Don't allow writing to /etc
yorickvP Feb 14, 2023
ad1f61c
container test: make /etc writable
yorickvP Feb 14, 2023
49fd72a
Make /etc writability conditional on uid-range feature
yorickvP Feb 14, 2023
707ba52
Merge pull request #7830 from yorickvP/fix-writable-etc
edolstra Feb 14, 2023
3504938
Fix static build
edolstra Feb 14, 2023
601849b
Merge pull request #7835 from edolstra/fix-static-build
edolstra Feb 15, 2023
cec23f5
ExprOpHasAttr,ExprSelect,stripIndentation,binds,formals: delete losts…
Et7f3 Feb 10, 2023
a88ae62
Merge pull request #7811 from Et7f3/fix_memory_leaks
roberth Feb 16, 2023
bbba49b
Wait with making /etc unwritable until after build env setup
yorickvP Feb 17, 2023
cd58336
Move `Derivation` toJSON logic to libnixstore
Ericson2314 Feb 17, 2023
7998686
Test `toJSON` of `DerivationOutput` and `Derivation`
Ericson2314 Feb 19, 2023
dda83a5
Merge pull request #7158 from sternenseemann/foldl-strict-accumulatio…
fricklerhandwerk Feb 19, 2023
9a3f66d
Merge pull request #7433 from yorickvP/improv-onboarding
thufschmitt Feb 20, 2023
d7a4f08
Nix's own flake: Dedup and memoize more
Ericson2314 Mar 2, 2022
807ef8f
doc/hacking.md: Corrections and additions for cross
roberth Feb 20, 2023
de71483
Merge pull request #6538 from zimbatm/simplify-flake
roberth Feb 20, 2023
fa4733f
Split out `InstallableFlake` and `InstallableAttrPath`
Ericson2314 Feb 3, 2023
57a2e46
Slight cleanup of `InstallablesCommand::load`
Ericson2314 Feb 4, 2023
1bd03ad
Split out `CmdRepl` and `editorFor`
Ericson2314 Feb 4, 2023
924ef67
Merge pull request #7748 from obsidiansystems/split-other-installables
tomberek Feb 20, 2023
0258ac9
Make `--read-only` a separate mixin
Ericson2314 Feb 5, 2023
df6829e
Merge pull request #7867 from NixOS/hacking-cross
roberth Feb 20, 2023
c7bd3a8
Merge pull request #7863 from obsidiansystems/test-derivation-to-json
roberth Feb 20, 2023
208c8d3
`Derivation::toJSON`: fix bug!
Ericson2314 Feb 20, 2023
5510daf
Merge pull request #7872 from obsidiansystems/test-derivation-to-json
tomberek Feb 20, 2023
532c70f
Merge pull request #7856 from yorickvP/fix-nsswitch
thufschmitt Feb 21, 2023
5b0175e
Fix the build without GC
Ericson2314 Feb 21, 2023
c7885ab
Merge pull request #7755 from obsidiansystems/mix-read-only-mode
thufschmitt Feb 21, 2023
8418d22
Merge pull request #7874 from obsidiansystems/fix-no-gc-build
thufschmitt Feb 21, 2023
16111aa
Fix `isStatic` arguments to `commonDeps`
Ericson2314 Feb 21, 2023
8ed2965
Merge pull request #7875 from obsidiansystems/try-fix-aarch64-static
edolstra Feb 21, 2023
e69584d
Remove my CODEOWNER-ship to libstore
thufschmitt Feb 22, 2023
c309078
Fix the static build
edolstra Feb 22, 2023
a2f5ab9
Merge pull request #7881 from NixOS/thufschmitt-codeowners-shrink
edolstra Feb 22, 2023
6589081
Merge pull request #7884 from edolstra/fix-static
edolstra Feb 22, 2023
4a921ba
Merge pull request #7764 from yorickvP/build-remote-warning
thufschmitt Feb 22, 2023
de1a1cb
Merge remote-tracking branch 'upstream/master' into tcp-store
Ericson2314 Feb 23, 2023
f38006b
Support systemd socket activation support more comprensively
Ericson2314 Feb 23, 2023
41d2188
Merge branch 'systemd-multi-socket' into tcp-store
Ericson2314 Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
This CODEOWNERS file contains errors

CODEOWNERS errors

  • Unknown owner on line 14: make sure @fricklerhandwerk exists and has write access to the repository
    /doc @fricklerhandwerk
  • Unknown owner on line 15: make sure @fricklerhandwerk exists and has write access to the repository
    *.md @fricklerhandwerk
  • Unknown owner on line 18: make sure @thufschmitt exists and has write access to the repository
    /src/libstore @thufschmitt
Original file line number Diff line number Diff line change
@@ -5,11 +5,14 @@
# For documentation on this mechanism, see https://help.github.com/articles/about-codeowners/

# Default reviewers if nothing else matches
* @edolstra @thufschmitt
* @edolstra

# This file
.github/CODEOWNERS @edolstra

# Public documentation
/doc @fricklerhandwerk
*.md @fricklerhandwerk

# Libstore layer
/src/libstore @thufschmitt
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -25,4 +25,4 @@ Maintainers: tick if completed or explain if not relevant
- [ ] documentation in the manual
- [ ] code and comments are self-explanatory
- [ ] commit message explains why the change was made
- [ ] new feature or bug fix: updated release notes
- [ ] new feature or incompatible change: updated release notes
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -27,6 +27,6 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
pull_description: |-
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
Automatic backport to `${target_branch}`, triggered by a label in #${pull_number}.
# should be kept in sync with `uses`
version: v0.0.5
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v19
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- uses: cachix/cachix-action@v12
if: needs.check_secrets.outputs.cachix == 'true'
@@ -58,7 +58,7 @@ jobs:
with:
fetch-depth: 0
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v19
- uses: cachix/cachix-action@v12
with:
name: '${{ env.CACHIX_NAME }}'
@@ -77,7 +77,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v19
with:
install_url: '${{needs.installer.outputs.installerURL}}'
install_options: "--tarball-url-prefix https://${{ env.CACHIX_NAME }}.cachix.org/serve"
@@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v19
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- run: echo NIX_VERSION="$(nix --experimental-features 'nix-command flakes' eval .\#default.version | tr -d \")" >> $GITHUB_ENV
- uses: cachix/cachix-action@v12
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -103,6 +103,7 @@ outputs/

*.a
*.o
*.o.tmp
*.so
*.dylib
*.dll
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -36,4 +36,4 @@ endif

include mk/lib.mk

GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++20 -I src
GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++2a -I src
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ Information on additional installation methods is available on the [Nix download

## Building And Developing

See our [Hacking guide](https://nixos.org/manual/nix/stable/contributing/hacking.html) in our manual for instruction on how to
build nix from source with nix-build or how to get a development environment.
See our [Hacking guide](https://nixos.org/manual/nix/unstable/contributing/hacking.html) in our manual for instruction on how to
to set up a development environment and build Nix from source.

## Additional Resources

4 changes: 4 additions & 0 deletions doc/manual/custom.css
Original file line number Diff line number Diff line change
@@ -5,3 +5,7 @@ h1:not(:first-of-type) {
h2 {
margin-top: 1em;
}

.hljs-meta {
user-select: none;
}
6 changes: 3 additions & 3 deletions doc/manual/local.mk
Original file line number Diff line number Diff line change
@@ -51,13 +51,13 @@ $(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli
$(d)/src/command-ref/new-cli: $(d)/nix.json $(d)/generate-manpage.nix $(bindir)/nix
@rm -rf $@
$(trace-gen) $(nix-eval) --write-to [email protected] --expr 'import doc/manual/generate-manpage.nix { toplevel = builtins.readFile $<; }'
# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
@# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
$(trace-gen) sed -i [email protected]/*.md -e 's^@docroot@^../..^g'
@mv [email protected] $@

$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(bindir)/nix
@cat doc/manual/src/command-ref/conf-file-prefix.md > [email protected]
# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
@# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-options.nix (builtins.fromJSON (builtins.readFile $<))' \
| sed -e 's^@docroot@^..^g'>> [email protected]
@mv [email protected] $@
@@ -72,7 +72,7 @@ $(d)/conf-file.json: $(bindir)/nix

$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(bindir)/nix
@cat doc/manual/src/language/builtins-prefix.md > [email protected]
# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
@# @docroot@: https://nixos.org/manual/nix/unstable/contributing/hacking.html#docroot-variable
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-builtins.nix (builtins.fromJSON (builtins.readFile $<))' \
| sed -e 's^@docroot@^..^g' >> [email protected]
@cat doc/manual/src/language/builtins-suffix.md >> [email protected]
13 changes: 13 additions & 0 deletions doc/manual/src/command-ref/env-common.md
Original file line number Diff line number Diff line change
@@ -91,3 +91,16 @@ Most Nix commands interpret the following environment variables:
variable sets the initial size of the heap in bytes. It defaults to
384 MiB. Setting it to a low value reduces memory consumption, but
will increase runtime due to the overhead of garbage collection.

## XDG Base Directory

New Nix commands conform to the [XDG Base Directory Specification], and use the following environment variables to determine locations of various state and configuration files:

- [`XDG_CONFIG_HOME`]{#env-XDG_CONFIG_HOME} (default `~/.config`)
- [`XDG_STATE_HOME`]{#env-XDG_STATE_HOME} (default `~/.local/state`)
- [`XDG_CACHE_HOME`]{#env-XDG_CACHE_HOME} (default `~/.cache`)

Classic Nix commands can also be made to follow this standard using the [`use-xdg-base-directories`] configuration option.

[XDG Base Directory Specification]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
[`use-xdg-base-directories`]: ../command-ref/conf-file.md#conf-use-xdg-base-directories
158 changes: 132 additions & 26 deletions doc/manual/src/contributing/hacking.md
Original file line number Diff line number Diff line change
@@ -8,54 +8,82 @@ $ git clone https://github.com/NixOS/nix.git
$ cd nix
```

To build Nix for the current operating system/architecture use
The following instructions assume you already have some version of Nix installed locally, so that you can use it to set up the development environment. If you don't have it installed, follow the [installation instructions].

[installation instructions]: ../installation/installation.md

## Nix with flakes

This section assumes you are using Nix with [flakes] enabled. See the [next section](#classic-nix) for equivalent instructions which don't require flakes.

[flakes]: ../command-ref/new-cli/nix3-flake.md#description

To build all dependencies and start a shell in which all environment
variables are set up so that those dependencies can be found:

```console
$ nix-build
$ nix develop
```

or if you have a flake-enabled nix:
This shell also adds `./outputs/bin/nix` to your `$PATH` so you can run `nix` immediately after building it.

To get a shell with one of the other [supported compilation environments](#compilation-environments):

```console
$ nix build
$ nix develop .#native-clang11StdenvPackages
```

This will build `defaultPackage` attribute defined in the `flake.nix`
file. To build for other platforms add one of the following suffixes to
it: aarch64-linux, i686-linux, x86\_64-darwin, x86\_64-linux. i.e.
> **Note**
>
> Use `ccacheStdenv` to drastically improve rebuild time.
> By default, [ccache](https://ccache.dev) keeps artifacts in `~/.cache/ccache/`.

To build Nix itself in this shell:

```console
$ nix-build -A defaultPackage.x86_64-linux
[nix-shell]$ ./bootstrap.sh
[nix-shell]$ ./configure $configureFlags --prefix=$(pwd)/outputs/out
[nix-shell]$ make -j $NIX_BUILD_CORES
```

To build all dependencies and start a shell in which all environment
variables are set up so that those dependencies can be found:
To install it in `$(pwd)/outputs` and test it:

```console
$ nix-shell
[nix-shell]$ make install
[nix-shell]$ make installcheck -j $NIX_BUILD_CORES
[nix-shell]$ nix --version
nix (Nix) 2.12
```

or if you have a flake-enabled nix:
To build a release version of Nix:

```console
$ nix develop
$ nix build
```

To get a shell with a different compilation environment (e.g. stdenv,
gccStdenv, clangStdenv, clang11Stdenv, ccacheStdenv):
You can also build Nix for one of the [supported target platforms](#target-platforms).

## Classic Nix

This section is for Nix without [flakes].

To build all dependencies and start a shell in which all environment
variables are set up so that those dependencies can be found:

```console
$ nix-shell -A devShells.x86_64-linux.clang11StdenvPackages
$ nix-shell
```

or if you have a flake-enabled nix:
To get a shell with one of the other [supported compilation environments](#compilation-environments):

```console
$ nix develop .#clang11StdenvPackages
$ nix-shell -A devShells.x86_64-linux.native-clang11StdenvPackages
```

Note: you can use `ccacheStdenv` to drastically improve rebuild
time. By default, ccache keeps artifacts in `~/.cache/ccache/`.
> **Note**
>
> You can use `native-ccacheStdenvPackages` to drastically improve rebuild time.
> By default, [ccache](https://ccache.dev) keeps artifacts in `~/.cache/ccache/`.

To build Nix itself in this shell:

@@ -71,21 +99,99 @@ To install it in `$(pwd)/outputs` and test it:
[nix-shell]$ make install
[nix-shell]$ make installcheck -j $NIX_BUILD_CORES
[nix-shell]$ ./outputs/out/bin/nix --version
nix (Nix) 3.0
nix (Nix) 2.12
```

If you have a flakes-enabled Nix you can replace:
To build Nix for the current operating system and CPU architecture use

```console
$ nix-shell
$ nix-build
```

You can also build Nix for one of the [supported target platforms](#target-platforms).

## Platforms

As specified in [`flake.nix`], Nix can be built for various platforms:

- `aarch64-linux`
- `i686-linux`
- `x86_64-darwin`
- `x86_64-linux`

[`flake.nix`]: https://github.com/nixos/nix/blob/master/flake.nix

In order to build Nix for a different platform than the one you're currently
on, you need to have some way for your system Nix to build code for that
platform. Common solutions include [remote builders] and [binfmt emulation]
(only supported on NixOS).

[remote builders]: ../advanced-topics/distributed-builds.md
[binfmt emulation]: https://nixos.org/manual/nixos/stable/options.html#opt-boot.binfmt.emulatedSystems

These solutions let Nix perform builds as if you're on the native platform, so
executing the build is as simple as

```console
$ nix build .#packages.aarch64-linux.default
```

by:
for flake-enabled Nix, or

```console
$ nix develop
$ nix-build -A packages.aarch64-linux.default
```

for classic Nix.

You can use any of the other supported platforms in place of `aarch64-linux`.

Cross-compiled builds are available for ARMv6 and ARMv7, and Nix on unsupported platforms can be bootstrapped by adding more `crossSystems` in `flake.nix`.

## Compilation environments

Nix can be compiled using multiple environments:

- `stdenv`: default;
- `gccStdenv`: force the use of `gcc` compiler;
- `clangStdenv`: force the use of `clang` compiler;
- `ccacheStdenv`: enable [ccache], a compiler cache to speed up compilation.

To build with one of those environments, you can use

```console
$ nix build .#nix-ccacheStdenv
```

for flake-enabled Nix, or

```console
$ nix-build -A nix-ccacheStdenv
```

for classic Nix.

You can use any of the other supported environments in place of `nix-ccacheStdenv`.

## Editor integration

The `clangd` LSP server is installed by default on the `clang`-based `devShell`s.
See [supported compilation environments](#compilation-environments) and instructions how to set up a shell [with flakes](#nix-with-flakes) or in [classic Nix](#classic-nix).

To use the LSP with your editor, you first need to [set up `clangd`](https://clangd.llvm.org/installation#project-setup) by running:

```console
make clean && bear -- make -j$NIX_BUILD_CORES install
```

Configure your editor to use the `clangd` from the shell, either by running it inside the development shell, or by using [nix-direnv](https://github.com/nix-community/nix-direnv) and [the appropriate editor plugin](https://github.com/direnv/direnv/wiki#editor-integration).

> **Note**
>
> For some editors (e.g. Visual Studio Code), you may need to install a [special extension](https://open-vsx.org/extension/llvm-vs-code-extensions/vscode-clangd) for the editor to interact with `clangd`.
> 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.

## Running tests

### Unit-tests
@@ -219,7 +325,7 @@ After the CI run completes, you can check the output to extract the installer UR
5. To generate an install command, plug this `install_url` and your GitHub username into this template:

```console
sh <(curl -L <install_url>) --tarball-url-prefix https://<github-username>-nix-install-tests.cachix.org/serve
curl -L <install_url> | sh -s -- --tarball-url-prefix https://<github-username>-nix-install-tests.cachix.org/serve
```

<!-- #### Manually generating test installers
7 changes: 7 additions & 0 deletions doc/manual/src/glossary.md
Original file line number Diff line number Diff line change
@@ -19,6 +19,13 @@

[store derivation]: #gloss-store-derivation

- [instantiate]{#gloss-instantiate}, instantiation\
Translate a [derivation] into a [store derivation].

See [`nix-instantiate`](./command-ref/nix-instantiate.md).

[instantiate]: #gloss-instantiate

- [realise]{#gloss-realise}, realisation\
Ensure a [store path] is [valid][validity].

4 changes: 2 additions & 2 deletions doc/manual/src/installation/env-variables.md
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ Set the environment variable and install Nix

```console
$ export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
$ sh <(curl -L https://nixos.org/nix/install)
$ curl -L https://nixos.org/nix/install | sh
```

In the shell profile and rc files (for example, `/etc/bashrc`,
@@ -38,7 +38,7 @@ export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
```

> **Note**
>
>
> You must not add the export and then do the install, as the Nix
> installer will detect the presence of Nix configuration, and abort.

Loading