1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 08:19:35 +01:00
Commit graph

3146 commits

Author SHA1 Message Date
Cole Helbling
facfff45d3
Merge pull request #137 from DeterminateSystems/eelcodolstra/cf-65-determinate-nix-implicit-flake-lock-update-dont-update
lockFlake(): When updating a lock, respect the input's lock file
2025-07-09 20:00:02 +00:00
Eelco Dolstra
2ecc5156f4 lockFlake(): When updating a lock, respect the input's lock file 2025-07-09 19:04:29 +02:00
Eelco Dolstra
175406c313 Merge remote-tracking branch 'origin/2.30-maintenance' into sync-2.30.0 2025-07-07 19:23:15 +02:00
Thomas Bereknyei
9e7655f440 fix: make setuid tests use new build-dir location /nix/var/nix/builds 2025-07-07 10:13:40 -04:00
Eelco Dolstra
e809a5626e
Merge pull request #130 from DeterminateSystems/improve-nix-store-delete-errors
nix store delete: Show why deletion fails
2025-06-30 15:04:19 +00:00
Eelco Dolstra
71aecfc481 Fix test 2025-06-30 11:30:24 +02:00
Eelco Dolstra
38a73203a4 Fix eval caching for path flakes
This fix is somewhat hacky since the accessor/input fingerprint
situation is a bit of a mess.
2025-06-27 20:02:18 +02:00
Eelco Dolstra
31b00218fe Show which PID is causing a temp root
Example:

  error: Cannot delete path '/nix/store/klyng5rpdkwi5kbxkncy4gjwb490dlhb-foo.drv' because it's in use by Nix process '{nix-process:3605324}'.
2025-06-27 16:50:48 +02:00
Eelco Dolstra
b415faceca Don't allow flake inputs to have both a flakeref and a follows
Having both doesn't make sense so it's best to disallow it. If this
causes issues we could turn into a warning.
2025-06-26 12:56:54 +02:00
Eelco Dolstra
637c4f3ad7 Add tests for deep overrides
Taken from https://github.com/NixOS/nix/pull/6621.

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2025-06-26 12:56:49 +02:00
Eelco Dolstra
0e352a6cec Merge remote-tracking branch 'detsys/detsys-main' into fix-deep-overrides 2025-06-25 21:53:23 +02:00
Eelco Dolstra
7059d2b58b Merge remote-tracking branch 'origin/2.29-maintenance' into sync-2.29.1 2025-06-23 15:02:22 +02:00
Eelco Dolstra
833406121c Make the repl test more robust
Seen in https://github.com/DeterminateSystems/nix-src/actions/runs/15590867877/job/43909540271:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.

(cherry picked from commit 9eb46e9cc0)
2025-06-22 19:09:38 +00:00
Eelco Dolstra
37685b1c9c Fix Darwin test failure in repl.sh
Fixes

  error:
         … while processing sandbox path '/private/tmp/nix-shell.0MDgyx/nix-test/ca/repl/store/nix/var/nix/builds/nix-build-simple.drv-65916-3910734210' (/private/tmp/nix-shell.0MDgyx/nix-test/ca/repl/store)

         error: 'nix' is too short to be a valid store path

which happened because we were now putting the build directory
underneath the store directory.
2025-06-22 16:49:44 +02:00
Eelco Dolstra
5acf50a327 Disallow the build directory having world-writable parents 2025-06-22 16:49:44 +02:00
eldritch horrors
88b7db1ba4 libstore: Don't default build-dir to temp-dir, store setting
If a build directory is accessible to other users it is possible to
smuggle data in and out of build directories. Usually this is only
a build purity problem, but in combination with other issues it can
be used to break out of a build sandbox. to prevent this we default
to using a subdirectory of nixStateDir (which is more restrictive).

(cherry picked from pennae Lix commit 55b416f6897fb0d8a9315a530a9b7f0914458ded)
(store setting done by roberth)
2025-06-22 16:49:44 +02:00
Sergei Zimmerman
6ef683cb2a
Restore multiline formatting of lists in meson files
Applies a workaround to enforce multiline formatting
of lists to reduce code churn introduced in 93a42a5971.
2025-06-20 23:12:36 +03:00
Luc Perkins
3132aba8e4
Fix broken test 2025-06-19 15:23:10 -07:00
Luc Perkins
9c120596ec
Merge remote-tracking branch 'upstream/master' into messages-present-tense 2025-06-19 10:51:50 -07:00
Eelco Dolstra
1d5e161755
Merge pull request #113 from DeterminateSystems/eelcodolstra/fh-851-lock-nar-hashes-by-default
Add lazy-locks setting
2025-06-19 17:01:14 +00:00
Vladimír Čunát
5d2986d3c5 tests: fixup with jq-1.8.0 2025-06-19 18:48:59 +02:00
John Ericson
d254c840b5
Merge pull request #13349 from obsidiansystems/structured-attrs-json
Introduce top-level `structuredAttrs` field in JSON derivation format
2025-06-18 16:35:42 -04:00
Luc Perkins
d6710b4c04
Merge remote-tracking branch 'upstream/master' into messages-present-tense 2025-06-18 08:24:23 -07:00
Luc Perkins
d2a25fbe51
Fix Nix formatting changes 2025-06-18 08:23:37 -07:00
Vladimír Čunát
86fbaf3b14 tests: fixup with jq-1.8.0
(cherry picked from commit 77f6b6532f)
2025-06-18 15:18:06 +00:00
Vladimír Čunát
77f6b6532f
tests: fixup with jq-1.8.0 2025-06-18 10:11:50 +02:00
Eelco Dolstra
3a4e6cadeb Improve regression testing for uncachable source paths
These now throw an error by default in the test suite.
2025-06-16 23:59:33 +02:00
Eelco Dolstra
e3fa4faff9 fetchToStore(): Don't require a valid path in dry run mode 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
Sergei Zimmerman
f9170a84f6
tests/functional/lang: Add sort stability test for lists langer than 16 elements
libstdc++'s std::stable_sort and new builtins.sort implementation
special-case ranges with length less than or equal to 16 and delegate
to insertionsort.

Having a larger e2e test would allow catching sort stability issues
at functional level as well.
2025-06-15 16:52:08 +00:00
Eelco Dolstra
cbedb8e19a Fix broken fetchToStore() caching on unlocked inputs 2025-06-13 22:29:20 +02:00
Eelco Dolstra
802f585406 Add lazy-locks setting
This determines whether lock file entries omit a NAR hash. They're
included by default to make lazy trees compatible with older clients.
2025-06-13 17:45:37 +02:00
Jörg Thalheim
a1fe09d2c8
Merge pull request #13350 from xokdvium/meson-format
flake: Add meson formatter
2025-06-13 11:37:32 +02:00
John Ericson
f8c1ac9515 Introduce top-level structuredAttrs field in JSON derivation format
Makes the behavoral change of #13263 without the underlying refactor.
Hopefully this clearly safe from a perf and GC perspective, and will
make it easier to benchmark #13263.
2025-06-12 20:45:47 -04:00
Eelco Dolstra
6999183956 Don't allow flake inputs to have both a flakeref and a follows
Having both doesn't make sense so it's best to disallow it. If this
causes issues we could turn into a warning.
2025-06-12 20:38:51 +02:00
Eelco Dolstra
9a18a11d7d Add tests for deep overrides
Taken from https://github.com/NixOS/nix/pull/6621.

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2025-06-12 20:33:28 +02:00
Pol Dellaiera
5862f38d00 docker: use callPackage, parametrise the image build 2025-06-12 19:50:31 +02:00
Luc Perkins
ab10fddc6e
Rework future tense in user-facing messages 2025-06-12 09:07:36 -07:00
Eelco Dolstra
279a6b18db Formatting 2025-06-12 16:13:28 +02:00
Eelco Dolstra
0922c72777 Fix flakes test with lazy trees enabled 2025-06-12 16:02:42 +02:00
Eelco Dolstra
92d90e2aeb Run the Nix test suite with lazy trees enabled 2025-06-12 16:02:42 +02:00
Sergei Zimmerman
93a42a5971
flake: Add meson formatter
This adds a meson.format file that mostly mirrors the projects
meson style and a pre-commit hook to enforce this style.
Some low-diff files are formatted.
2025-06-11 22:08:03 +00:00
John Ericson
371fcf91c3
Merge pull request #13294 from obsidiansystems/fix-13293
Fix #13293
2025-06-11 16:55:43 -04:00
John Ericson
f42eaf2c8e Create test for #13293
It currently fails, before the fix.
2025-06-11 16:11:38 -04:00
Eelco Dolstra
9eb46e9cc0 Make the repl test more robust
Seen in https://github.com/DeterminateSystems/nix-src/actions/runs/15590867877/job/43909540271:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.
2025-06-11 20:53:28 +02:00
Eelco Dolstra
a95067d428
Merge pull request #103 from DeterminateSystems/repl-test-robust
Make the repl test more robust
2025-06-11 17:37:40 +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
Eelco Dolstra
87fb81a624 Make the repl test more robust
Seen in https://github.com/DeterminateSystems/nix-src/actions/runs/15590867877/job/43909540271:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.
2025-06-11 19:14:31 +02:00
Eelco Dolstra
de793b7324 Make the S3 test more robust
Waiting for the minio unit is apparently not reliable enough, so let's
also wait for the port.
2025-06-11 10:48:57 -04:00
Robert Hensing
c5b1be46b4
Merge pull request #11406 from kstrafe/master
nix repl: Print which variables are just loaded
2025-06-07 13:53:13 +02:00