John Ericson
0123640009
ParsedDerivation: don't take drvPath
...
It is just use for adding context to errors, but we have `addTrace` to
do that. Let the callers do that instead.
The callers doing so is a bit duplicated, yes, but this will get better
once `DerivationOptions` is included in `Derivation`.
2025-04-13 18:21:13 -04:00
Philipp Otterbein
56d37656ac
libexpr: fix UB in builtins.ceil and builtins.floor
...
tighten and fix specification of both builtins
2025-04-13 04:36:09 +02:00
Jörg Thalheim
71567373b6
Merge pull request #13008 from Mic92/aliases
...
Move alias support from NixArgs to MultiCommand + test
2025-04-12 11:06:09 +02:00
Philipp Otterbein
61bb405839
add isInterrupted() call and replace some checkInterrupt() occurrences
...
(cherry picked from commit 49f757c24a )
2025-04-11 22:15:12 +00:00
Philipp Otterbein
c53bd8905b
libstore: same progress bar behavior for PUT and POST requests
...
- no differentiation between uploads and downloads in CLI
(cherry picked from commit db297d3dda )
2025-04-11 22:15:12 +00:00
Philipp Otterbein
beab9eb978
libstore S3: fix progress bar and make file transfers interruptible
...
(cherry picked from commit 9da01e69f9 )
2025-04-11 22:15:11 +00:00
Dean De Leo
51073607ea
S3: opt-in the STSProfileCredentialsProvider
...
The STSProfileCredentialsProviders allows to assume a specific IAM role
when accessing an S3 repository. Sometimes this is needed to obtain the
permissions to operate on the bucket.
2025-04-11 23:47:56 +02:00
Philipp Otterbein
49f757c24a
add isInterrupted() call and replace some checkInterrupt() occurrences
2025-04-11 22:48:10 +02:00
Philipp Otterbein
db297d3dda
libstore: same progress bar behavior for PUT and POST requests
...
- no differentiation between uploads and downloads in CLI
2025-04-11 22:48:10 +02:00
Philipp Otterbein
9da01e69f9
libstore S3: fix progress bar and make file transfers interruptible
2025-04-11 22:48:10 +02:00
Eelco Dolstra
6cd2b4e169
Move alias support from NixArgs to MultiCommand
...
This allows subcommands to declare aliases, e.g. `nix store ping` is
now a proper alias of `nix store info`.
2025-04-10 19:48:55 +02:00
Eelco Dolstra
497fe6dd31
Make nix profile install an alias of nix profile add
2025-04-10 18:48:23 +02:00
Eelco Dolstra
666aa20da8
Move alias support from NixArgs to MultiCommand
...
This allows subcommands to declare aliases, e.g. `nix store ping` is
now a proper alias of `nix store info`.
2025-04-10 18:48:23 +02:00
Eelco Dolstra
62565ce7ce
Remove unused variable
2025-04-10 13:10:20 +02:00
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
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
Eelco Dolstra
dd15c8a20d
Move getAccessorCached() to InputCache
...
Also, make fetchTree use InputCache.
2025-04-09 23:06:03 +02:00
John Ericson
f9c262c3d5
Fix another machine config parsing bug
...
We were ignorning the result of `trim`, and after my last change we were
also trimmming too early.
(cherry picked from commit b74b0f4e1c )
2025-04-09 20:13:30 +00:00
Eelco Dolstra
3bbf917707
Move the input cache into libfetchers
2025-04-09 22:13:28 +02:00
Eelco Dolstra
0cb06d7eda
Rename FlakeCache -> InputCache and key it on Inputs instead of FlakeRefs
2025-04-09 21:38:08 +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
Eelco Dolstra
f45db85887
Actually ignore system/user registries during locking
...
Something went wrong in #12068 so this didn't work. Also added a test.
2025-04-09 21:04:42 +02:00
John Ericson
2892b758b3
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.
(cherry picked from commit f8b13cce19 )
2025-04-09 18:27:16 +00: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
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
Eelco Dolstra
a08477975d
Actually ignore system/user registries during locking
...
Something went wrong in #12068 so this didn't work. Also added a test.
(cherry picked from commit 77d4316353 )
2025-04-09 16:33:47 +00: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
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
Eelco Dolstra
f058567e9a
Fix printAmbiguous() / printValueAsJSON()
2025-04-09 00:15:08 +02:00
Eelco Dolstra
febd28db87
Lazily copy trees to the store
...
We now mount lazy accessors on top of /nix/store without materializing
them, and only materialize them to the real store if needed (e.g. in
the `derivation` primop).
2025-04-08 23:41:59 +02:00
Eelco Dolstra
c891554999
Merge branch 'lazy-flake-commands' into lazy-trees-v2
2025-04-08 22:16:20 +02:00
Eelco Dolstra
c548e92860
Merge pull request #12966 from NixOS/mergify/bp/2.28-maintenance/pr-12958
...
Fix some unlinked tests (backport #12958 )
2025-04-08 13:55:54 +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
Graham Christensen
cd7e01526e
format as required
...
(cherry picked from commit 9b47b2b217 )
2025-04-07 23:16:28 +00:00
Graham Christensen
16a2cddfb9
Add trailing commas on addFlag incantations
...
(cherry picked from commit 06acbd37bd )
2025-04-07 23:16:27 +00: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
Eelco Dolstra
3a4dc47c22
Remove unused tracing-file-system-object-sink.{hh,cc}
...
(cherry picked from commit 611fd806cb )
2025-04-07 20:42:08 +00:00
Eelco Dolstra
f0ed61bb4e
Fix/run monitorfdhup test
...
(cherry picked from commit 340fa00d52 )
2025-04-07 20:42:08 +00:00
John Ericson
596389a5f6
Merge pull request #12958 from DeterminateSystems/unlinked-tests
...
Fix some unlinked tests
2025-04-07 16:41:07 -04:00
Eelco Dolstra
85902fad58
Fix some clang-tidy warnings
...
(cherry picked from commit c0ad5d36c4 )
2025-04-07 20:38:07 +00: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
Eelco Dolstra
aa1c690ebf
Keep fchmodat2-compat.hh private
...
Since it references store-config-private.hh.
(cherry picked from commit 04e9dc27ac )
2025-04-07 19:18:46 +00: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
Eelco Dolstra
17de9dd275
Make lexer-helpers.hh internal to fix a clang-tidy error
...
(cherry picked from commit 8be24f58f2 )
2025-04-07 18:29:08 +00:00