Eelco Dolstra
af5815fd54
Give unit tests access to a $HOME directory
...
Also, don't try to access cache.nixos.org in the libstore unit tests.
2025-06-16 12:27:44 -04:00
Eelco Dolstra
dc5e620032
fetchToStore() cache: Use content hashes instead of store paths
...
We can always compute the store path from the content hash, but not
vice versa. Storing the content hash allows `hashPath()` to be
replaced by `fetchToStore(...FetchMode::DryRun...)`, which gets us
caching in lazy-trees mode.
2025-06-16 12:27:44 -04:00
Eelco Dolstra
8b9cb382e9
Fix path field in fetcher cache
...
86785fd9d1 was broken because it was
storing the full path in the MountedSourceAccessor as the `path` field
in the fetcher cache key (i.e. including the
/nix/store/... prefix). Especially in the case of lazy (virtual) store
paths, this didn't work at all because those paths are different every time.
2025-06-13 22:29:20 +02:00
Eelco Dolstra
cbedb8e19a
Fix broken fetchToStore() caching on unlocked inputs
2025-06-13 22:29:20 +02:00
Luc Perkins
b8e8214d5f
Fix one more 'will'
2025-06-12 08:28:01 -07:00
Luc Perkins
e565571f69
Re-supply inadvertently deleted word
2025-06-12 08:25:10 -07:00
Eelco Dolstra
279a6b18db
Formatting
2025-06-12 16:13:28 +02:00
Eelco Dolstra
6477d7c2ca
mountInput(): Optimize getting the NAR hash for real store paths
2025-06-12 16:11:54 +02:00
Eelco Dolstra
fca291afc3
Fix NAR hash checking for fetchGit with lazy tees
...
If a NAR hash is specified, we should probably check
it. Unfortunately, for now this has the side effect of forcing NAR
hash checking of any input that has a NAR hash.
2025-06-12 16:02:42 +02:00
Eelco Dolstra
b067e6566f
Git fetcher: Do not consider a null revision (i.e. workdir) to be locked
2025-06-12 16:02:42 +02:00
Cole Helbling
3114862518
Merge pull request #98 from DeterminateSystems/fix-fetchToStore-dryRun-caching
...
fetchToStore(): Improve caching in dry-run mode
2025-06-12 00:25:23 +00:00
Eelco Dolstra
168184a0d4
Merge pull request #100 from DeterminateSystems/lib-tests-lazy
...
Run nixpkgsLibTests in lazy trees mode
2025-06-11 18:51:13 +00:00
Luc Perkins
27755169f9
Merge pull request #92 from DeterminateSystems/lucperkins/fh-864-fix-error-messages-to-avoid-fake-future-tense
...
Fix some instances of 'will'
2025-06-11 17:27:24 +00:00
Luc Perkins
42c50aafad
Fix broken link in configuration description
2025-06-11 08:55:46 -07:00
Eelco Dolstra
31e58dcb92
nix-instantiate --eval --xml: Devirtualize the output
2025-06-11 17:18:42 +02:00
Eelco Dolstra
df7a2a1bed
nix-instantiate --eval --json: Devirtualize the output
2025-06-11 17:14:33 +02:00
Eelco Dolstra
2f5a545997
fetchToStore(): Improve caching in dry-run mode
...
In dry-run mode, we don't need to require a valid path.
2025-06-11 16:13:40 +02:00
Graham Christensen
c6f87378db
Update src/libmain/plugin.cc
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-06-11 10:02:27 -04:00
Graham Christensen
ac6318c9c5
Merge pull request #97 from DeterminateSystems/fix-duplicate-builtins
...
Don't register extra primops twice
2025-06-11 13:10:23 +00:00
Eelco Dolstra
7f6efe93e4
Don't register extra primops twice
...
This was the result of a bad merge.
2025-06-11 13:06:14 +02:00
Eelco Dolstra
86785fd9d1
fetchToStore(): Fix caching
...
This was broken because MountedSourceAccessor did not return a
fingerprint. Previously fingerprints were global to an accessor, but
with a MountedSourceAccessor the fingerprint can be different for each
mount point.
2025-06-06 22:09:35 +02:00
Eelco Dolstra
f8ef941c04
fetchToStore(): Cache in dry-run mode
2025-06-06 21:50:55 +02:00
Eelco Dolstra
74af43ee91
Remove superfluous semicolon
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2025-06-06 20:03:33 +02:00
Luc Perkins
a989a23d1a
Fix some instances of 'will'
2025-06-06 10:51:58 -07:00
Eelco Dolstra
e18b1637dc
Fix display of paths in substituted source trees
...
These got displayed as e.g.
«github:NixOS/nixpkgs/adaa24fbf46737f3f1b5497bf64bae750f82942e?narHash=sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY%3D»/nix/store/x9wnkly3k1gkq580m90jjn32q9f05q2v-source/pkgs/stdenv/generic/source-stdenv.sh
Now we get
«github:NixOS/nixpkgs/adaa24fbf46737f3f1b5497bf64bae750f82942e?narHash=sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY%3D»/pkgs/stdenv/generic/source-stdenv.sh
2025-06-06 19:41:12 +02:00
Eelco Dolstra
a69b99ade0
Add ForwardingSourceAccessor
2025-06-06 19:40:57 +02:00
Cole Helbling
dfa7b2a288
libstore/unix/derivation-builder: error earlier when sandbox path is inaccessible
2025-06-04 12:16:34 -07:00
Cole Helbling
63e9e9df37
fixup: only show "you can rerun" message if the derivation's platform is supported on this machine
2025-06-03 10:53:05 -07:00
Cole Helbling
242719cffb
--keep-failed with remote builders will keep the failed build directory on that builder
2025-06-02 14:41:29 -07:00
Graham Christensen
f8aabb0749
Merge pull request #79 from DeterminateSystems/path-position-info
...
Include the source location when warning about inefficient double copies
2025-06-02 18:51:49 +00:00
Graham Christensen
7a450a8ba9
Update src/libexpr/paths.cc
2025-06-02 14:08:42 -04:00
Graham Christensen
8a82624801
Merge pull request #81 from DeterminateSystems/push-twpuyuspwtpz
...
Replace ε and ∅
2025-06-02 17:32:11 +00:00
Graham Christensen
1500e541f2
diff-closures: use removed / added words
2025-06-02 11:21:26 -04:00
Eelco Dolstra
665e76f2e5
deletePath(): Keep going when encountering an undeletable file
...
This should reduce the impact of #5207 .
2025-06-02 17:17:09 +02:00
Graham Christensen
724d552b64
Use words like added / removed
2025-06-02 09:30:18 -04:00
Graham Christensen
039d19159f
Replace ∅ with (absent)
2025-06-02 09:29:55 -04:00
Graham Christensen
7d2dbbd3aa
Rename ε to "(no version)"
2025-06-02 09:22:55 -04:00
Eelco Dolstra
b16fa06ff1
nix store copy-sigs: Add docs
2025-06-02 12:06:21 +02:00
Eelco Dolstra
0278b9e180
nix store copy-sigs: Use http-connections setting to control parallelism
...
Previously it used the `ThreadPool` default,
i.e. `std:🧵 :hardware_concurrency()`. But copying signatures is
not primarily CPU-bound so it makes more sense to use the
`http-connections` setting (since we're typically copying from/to a
binary cache).
2025-06-02 11:44:16 +02:00
Eelco Dolstra
3e45b40d66
Add position info to path values
...
(Actually, this adds a position field to *all* values.)
This allows improving the "inefficient double copy" warning by showing
where the source path came from in the source, e.g.
warning: Performing inefficient double copy of path '/home/eelco/Dev/patchelf/' to the store at /home/eelco/Dev/patchelf/flake.nix:30:17. This can typically be avoided by rewriting an attribute like `src = ./.` to `src = builtins.path { path = ./.; name = "source"; }`.
2025-05-30 17:31:34 +02:00
Graham Christensen
4e08d4a917
Merge pull request #72 from DeterminateSystems/gustavderdrache/system-builderror
...
Make platform checks throw BuildError like other failures
2025-05-24 02:14:21 +00:00
gustavderdrache
562ed80bb7
Update src/libstore/unix/build/derivation-builder.cc
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2025-05-23 18:58:37 -04:00
Eelco Dolstra
af7bfe7827
fromStructuredAttrs(): Don't crash if exportReferencesGraph is a string
...
Fixes
error: [json.exception.type_error.302] type must be array, but is string
and other crashes.
Fixes #13254 .
2025-05-24 00:46:37 +02:00
Eelco Dolstra
09d46ad93a
Don't use 'callback' object that we may have moved out of
2025-05-24 00:46:37 +02:00
gustavderdrache
61c3efb4f4
Make platform checks throw BuildError like other failures
2025-05-23 17:40:02 -04:00
gustavderdrache
0b66fd3c34
Update src/libexpr/include/nix/expr/eval-settings.hh
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-22 17:30:14 -04:00
gustavderdrache
8825cd56b5
Log warnings on IFD with new option
2025-05-22 17:30:14 -04:00
Eelco Dolstra
1246506152
Tagging release 2.29.0
...
-----BEGIN PGP SIGNATURE-----
iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmgvHQQTHGVkb2xzdHJh
QGdtYWlsLmNvbQAKCRCBcLRybXGY3qVRCACZ22QWsHqvn6EEROSoSLbAH9/LqLOQ
jvDzVQ3jk+2LznLt+grfaiTP69nL4SmzMjjeRQxGCnKnDNfHyPkxv5ddRJjX0SCA
A89m6Fctas5frtbhmKDnLBx3lwKEFS0sq2qEp4uYUb9hU1gaByaLUbGcUUXQ2P3c
fD1lm0uK/Z9IXY4h3/pyfp7tacYynuO+5E8F1C7T81hc/fA8EUBj6Yof1Ykx/Hg5
Qj+iQ6y1i94XU4Y3SJYy8mjmILdsYNj+ICQ0IYQuWEARTiGZqLfo2uGtSroR5hLy
PqYpqp9whQOpb7PyoQ28A0Gzc43O/MgpHnZO+KjV07SFXeqDnoWdltse
=GWRg
-----END PGP SIGNATURE-----
Merge tag '2.29.0' into sync-2.29
Tagging release 2.29.0
2025-05-22 14:53:09 +02:00
Jörg Thalheim
90eb2f759c
libutil-tests/json-utils: fix -Werror=sign-compare error
...
I am on a newer different nixpkgs branch, so I am getting this error
(cherry picked from commit 1290b7e53d )
2025-05-19 14:16:43 +00:00
Eelco Dolstra
5d7ebaed24
Merge remote-tracking branch 'origin/2.29-maintenance' into sync-2.29
2025-05-19 16:12:55 +02:00