1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00
Commit graph

20067 commits

Author SHA1 Message Date
Eelco Dolstra
e3042f10af Move getAccessorCached() to InputCache 2025-04-10 10:24:15 +02:00
Eelco Dolstra
012453d1e6 Move the input cache into libfetchers 2025-04-10 10:24:15 +02:00
Eelco Dolstra
c7f8147282 Rename FlakeCache -> InputCache and key it on Inputs instead of FlakeRefs 2025-04-10 10:24:15 +02:00
Eelco Dolstra
3f3cc6f438
Merge pull request #12991 from Mic92/cgroup
linux/cgroup: delete double quote in error message
2025-04-10 10:11:24 +02:00
Eelco Dolstra
26cb166bca
Merge pull request #12531 from obsidiansystems/store-accessor-root
`Store::getFSAccessor`: Do not include the store dir
2025-04-10 09:55:03 +02:00
Jörg Thalheim
b3f80283a6 linux/cgroup: delete double quote in error message 2025-04-10 09:31:48 +02:00
Eelco Dolstra
9d3595646d nix shell: Resolve symlinks in storeFS
`storeFS` is the `MountedSourceAccessor` that wraps `store->getFSAccessor()`.
2025-04-09 17:34:19 -04:00
John Ericson
eb643d034f Store::getFSAccessor: Do not include the store dir
Rather than "mounting" the store inside an empty virtual filesystem,
just return the store as a virtual filesystem. This is more modular.

(FWIW, it also supports two long term hopes of mind:

1. More capability-based Nix language mode. I dream of a "super pure
   eval" where you can only use relative path literals (See #8738), and
   any `fetchTree`-fetched stuff + the store are all disjoint (none is
   mounted in another) file systems.

2. Windows, where the store dir may include drive letters, etc., and is
   thus unsuitable to be the prefix of any `CanonPath`s.

)

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-04-09 17:34:18 -04:00
Jörg Thalheim
2455bda91b
Merge pull request #12986 from obsidiansystems/fix-machine-commment-semicolon
Fix another machine config parsing bug
2025-04-09 22:12:26 +02:00
John Ericson
b74b0f4e1c Fix another machine config parsing bug
We were ignorning the result of `trim`, and after my last change we were
also trimmming too early.
2025-04-09 15:33:09 -04:00
Jörg Thalheim
d45067177e
Merge pull request #12984 from obsidiansystems/fix-machine-commment-semicolon
Fix `;` and `#` bug in machine file parsing
2025-04-09 20:26:03 +02:00
Robert Hensing
fc77a89d53
Merge pull request #12699 from rvl/subflake-locking-test
tests/functional/flakes: Add test case for subflake locking
2025-04-09 19:19:34 +02:00
John Ericson
f8b13cce19 Fix ; and # bug in machine file parsing
Comments go to the end of the line, not merely the next ; *or* \n. Fix
by splitting on `;` *within* lines, and test.
2025-04-09 12:38:42 -04:00
Jörg Thalheim
ea48a318ba
Merge pull request #12979 from DeterminateSystems/fix-ignore-local-registrie
Actually ignore system/user registries during locking
2025-04-09 18:32:54 +02:00
Jörg Thalheim
6d50980c2f
Merge pull request #12978 from SuperSandro2000/patch-2
Fix meson warning about meson_version 1.1
2025-04-09 18:31:47 +02:00
Eelco Dolstra
77d4316353 Actually ignore system/user registries during locking
Something went wrong in #12068 so this didn't work. Also added a test.
2025-04-09 17:59:51 +02:00
Sandro
f9a8fdecf5
Fix meson warning about meson_version 1.1
meson.options requires that we set meson_version to at least 1.1

similar to #12956
2025-04-09 15:31:34 +02:00
Picnoir
e12369a68e store URI: introduce multiple signatures support
Add a `secretKeyFiles` URI parameter in the store URIs receiving a
coma-separated list of Nix signing keyfiles.

For instance:

  nix copy --to "file:///tmp/store?secret-keys=/tmp/key1,/tmp/key2" \
    "$(nix build --print-out-paths nixpkgs#hello)"

The keys passed through this new store URI parameter are merged with
the key specified in the `secretKeyFile` parameter, if any.

We'd like to rotate the signing key for cache.nixos.org. To simplify
the transition, we'd like to sign the new paths with two keys: the new
one and the current one. With this, the cache can support nix
configurations only trusting the new key and legacy configurations
only trusting the current key.

See https://github.com/NixOS/rfcs/pull/149 for more informations
behind the motivation.
2025-04-09 13:30:37 +02:00
Robert Hensing
e76bbe413e
Merge pull request #12877 from roberth/c-api-libflake-override-input
C API: Flake loading, input overriding
2025-04-08 09:01:51 +02:00
John Ericson
73d3159ba0
Merge pull request #12967 from DeterminateSystems/trailing-commas
Add trailing commas on addFlag incantations
2025-04-07 19:14:31 -04:00
Graham Christensen
9b47b2b217 format as required 2025-04-07 17:24:41 -04:00
Graham Christensen
06acbd37bd Add trailing commas on addFlag incantations 2025-04-07 17:18:15 -04:00
John Ericson
596389a5f6
Merge pull request #12958 from DeterminateSystems/unlinked-tests
Fix some unlinked tests
2025-04-07 16:41:07 -04:00
John Ericson
6789202af0
Merge pull request #12962 from DeterminateSystems/clang-tidy-warnings
Fix some clang-tidy warnings
2025-04-07 16:37:02 -04:00
John Ericson
3bcc70b64f
Merge pull request #12959 from DeterminateSystems/fchmodat2-compat-private
Keep fchmodat2-compat.hh private
2025-04-07 15:17:46 -04:00
John Ericson
856f8e0e49
Merge pull request #12961 from DeterminateSystems/lexer-helpers-private
Make lexer-helpers.hh internal to fix a clang-tidy error
2025-04-07 14:28:14 -04:00
Eelco Dolstra
c0ad5d36c4 Fix some clang-tidy warnings 2025-04-07 19:55:33 +02:00
Eelco Dolstra
d1ba01235f
Merge pull request #12956 from SuperSandro2000/patch-2
Fix meson warnings on minimum version
2025-04-07 19:50:36 +02:00
Eelco Dolstra
8be24f58f2 Make lexer-helpers.hh internal to fix a clang-tidy error 2025-04-07 18:21:08 +02:00
Eelco Dolstra
04e9dc27ac Keep fchmodat2-compat.hh private
Since it references store-config-private.hh.
2025-04-07 18:19:42 +02:00
Eelco Dolstra
611fd806cb Remove unused tracing-file-system-object-sink.{hh,cc} 2025-04-07 17:10:28 +02:00
Eelco Dolstra
340fa00d52 Fix/run monitorfdhup test 2025-04-07 17:09:42 +02:00
Sandro
14a829acbb
Fix meson warnings on minimum version
nix> meson.build:216: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:222: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:235: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:236: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:242: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
2025-04-07 15:06:10 +02:00
Jörg Thalheim
2960d7adf5
Merge pull request #12951 from Mic92/fix-race-condition
tests/functional/repl: fix race condition
2025-04-07 14:18:05 +02:00
Jörg Thalheim
1de951d31d tests/functional/repl: fix race condition
the sleep 1 is not enough in some circumstances. Switching to a fifo
helps.
2025-04-07 14:00:19 +02:00
Jörg Thalheim
3ff19be1f7
Merge pull request #12944 from roberth/maintainers-release-notes-fail
maintainers/release-notes: Let it fail
2025-04-07 10:51:08 +02:00
mergify[bot]
07204ff6e5
Merge pull request #12940 from NixOS/header-cleanup
Header cleanup
2025-04-07 00:09:49 +00:00
Robert Hensing
da36c34db7 maintainers/release-notes: Let it fail
Fail when a command fails.

Basic error handling was missing, which would lead to errors getting
obscured a bit by subsequent successful logging.
2025-04-07 01:46:43 +02:00
mergify[bot]
1dc7e6c4dc
Merge pull request #12936 from ajlekcahdp4/master
libflake: add lock file path to invalid json error
2025-04-06 23:32:50 +00:00
John Ericson
7a7fe350d5 Get rid of raw -D defines, always use private config files
Now that we have the private vs public distinction, we can do this
without leaking information downstream.
2025-04-06 18:53:42 -04:00
John Ericson
3294b22a68 Clean some header related things.
Revert most of "Hack together a fix for the public headers"

- The `libmain` change is kept, and one more libmain change is made.
  (Need to update Meson and Nix per the package alike).

- The S3 situation is fixed in a different way: the variable is public
  now, used in the header, and fixed accordingly.

- Fix TODO for `HAVE_EMBEDDED_SANDBOX_SHELL`

This reverts commit 2b51250534.
2025-04-06 18:53:38 -04:00
mergify[bot]
3fcdccb8ce
Merge pull request #12939 from NixOS/2.28-release-notes
2.28 release notes for master
2025-04-06 21:41:00 +00:00
Robert Hensing
78e2832d7d Edit rl-2.28
(cherry picked from commit 1ca3ee1287)
2025-04-06 17:03:38 -04:00
Robert Hensing
4ac9bc08ea Fix maintainers/release-credits output
(cherry picked from commit b87b3d79f2)
2025-04-06 17:03:36 -04:00
Robert Hensing
93248bd92c doc/rl-2.28: Add contributors
(cherry picked from commit fea87a94e6)
2025-04-06 17:03:36 -04:00
Robert Hensing
f261c03686 chore: Update contributor handle caches
(cherry picked from commit 6687ce2a6d)
2025-04-06 17:03:35 -04:00
John Ericson
682a28a76b release notes: 2.28.0
(cherry picked from commit 703f0fbe74)
2025-04-06 17:03:34 -04:00
Alexander Romanov
e3873aa1a0 libflake: add lock file path to invalid json error
Previously, when lock file contained invalid JSON nix reported a parser
error without specifying the file it came from.

This change adds flake.lock file path to the error message to avoid
confusion.
2025-04-06 22:52:46 +03:00
mergify[bot]
a56aaf26c2
Merge pull request #12937 from roberth/undefined-macros
Fix undefined macro errors
2025-04-06 16:25:22 +00:00
Robert Hensing
77b4bb74d5 Fix undefined macro errors 2025-04-06 17:43:17 +02:00