1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00
Commit graph

3066 commits

Author SHA1 Message Date
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
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
Graham Christensen
62029df300 Fixup checks around the error message 'Will not write lock file of flake' 2025-06-06 17:29:11 -04:00
Graham Christensen
cbb635159c Fixup checks around the error message 'will not fetch unlocked input' 2025-06-06 17:28:17 -04: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
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
1500e541f2 diff-closures: use removed / added words 2025-06-02 11:21:26 -04:00
Graham Christensen
724d552b64 Use words like added / removed 2025-06-02 09:30:18 -04:00
Graham Christensen
7d2dbbd3aa Rename ε to "(no version)" 2025-06-02 09:22:55 -04:00
Eelco Dolstra
5f13d13f78 Fix trace-ifd test failure in dev shell
Fixes

  error: cannot create symlink '/home/eelco/Dev/nix/tests/functional/flakes/result'; already exists

running the test multiple times in a dev shell.
2025-05-26 13:56:38 +02:00
Eelco Dolstra
4bc1043ae4 Add test 2025-05-24 00:46:37 +02:00
gustavderdrache
4355b7cbd5 Add test for output warning to ensure stability 2025-05-22 17:30:14 -04:00
Eelco Dolstra
f50117ba4c Revert storeFS to use makeFSSourceAccessor()
Need to investigate why store->getFSAccessor() breaks a test.
2025-05-18 10:01:57 +02:00
Eelco Dolstra
9088d5b525 Merge remote-tracking branch 'origin/2.29-maintenance' into sync-2.29 2025-05-16 12:53:24 +02:00
Eelco Dolstra
c20642ac7b Merge remote-tracking branch 'origin/2.29-maintenance' into detsys-main 2025-05-16 12:48:44 +02:00
Eelco Dolstra
dc238ba102 Fix nix-copy-closure VM test
https://hydra.nixos.org/build/297112538
(cherry picked from commit d626348f42)
2025-05-15 15:51:43 +00:00
Eelco Dolstra
1b2e88effd Remove otherNixes.nix_2_18
Nixpkgs no longer has Nix 2.18, so this fails to evaluate.

(cherry picked from commit bc85e20fb9)
2025-05-15 09:44:21 +00:00
John Ericson
d972f9e2e2 Split out store-open.hh and store-registration.hh
The existing header is a bit too big. Now the following use-cases are
separated, and get their own headers:

- Using or implementing an arbitrary store: remaining `store-api.hh`

  This is closer to just being about the `Store` (and `StoreConfig`)
  classes, as one would expect.

- Opening a store from a textual description: `store-open.hh`

  Opening an aribtrary store implementation like this requires some sort
  of store registration mechanism to exists, but the caller doesn't need
  to know how it works. This just exposes the functions which use such a
  mechanism, without exposing the mechanism itself

- Registering a store implementation: `store-registration.hh`

  This requires understanding how the mechanism actually works, and the
  mechanism in question involves templated machinery in headers we
  rather not expose to things that don't need it, as it would slow down
  compilation for no reason.
2025-05-14 16:07:57 -04:00
Eelco Dolstra
824e0d51fe Test lock file contents more precisely 2025-05-13 10:40:24 +02:00
Jörg Thalheim
ed521760bc
Merge pull request #13161 from NixOS/remove-final
nix flake prefetch: Remove __final
2025-05-13 08:50:36 +02:00
Jörg Thalheim
6fdb170fb3
Merge pull request #13159 from NixOS/ignore-dir
Avoid unnecessarily updating old lock files with 'dir' parameters
2025-05-12 22:34:50 +02:00
Eelco Dolstra
51349ca37a Test lock file contents more precisely 2025-05-12 18:00:40 +02:00
Eelco Dolstra
4ea5cb3832 Fix emitting narHash in lock files when lazy trees are disabled 2025-05-12 17:34:32 +02:00
Eelco Dolstra
5a84237209 Improve build failure error messages
They're now laid out in a more readable way, and they shows the output
paths (if known).
2025-05-12 15:06:54 +02:00
Eelco Dolstra
da953d6d39 Add test 2025-05-09 16:55:13 +02:00
Graham Christensen
290368169e
Merge pull request #58 from DeterminateSystems/improve-build-failure-error
Improve build failure error messages
2025-05-09 14:03:35 +00:00
Eelco Dolstra
d00682beb2 Backward compatibility hack for dealing with dir in URL-style flakerefs 2025-05-09 10:10:42 +02:00
Eelco Dolstra
8014671210 Improve build failure error messages 2025-05-09 00:32:41 +02:00
Eelco Dolstra
bf1c0072f6 Backward compatibility hack for dealing with dir in URL-style flakerefs 2025-05-08 19:12:43 +02:00
Eelco Dolstra
f6ad6291ab nix flake metadata: Show store path if available 2025-05-07 15:56:35 +02:00
Eelco Dolstra
91cde8c79d EvalState::mountInput(): Throw an error if there is a NAR hash mismatch 2025-05-07 14:07:29 +02:00
Eelco Dolstra
630bdff7e9 Re-enable _NIX_TEST_FAIL_ON_LARGE_PATH tests 2025-05-07 12:49:11 +02:00
Eelco Dolstra
577b331464 Merge remote-tracking branch 'detsys/detsys-main' into lazy-trees-v2 2025-05-06 19:09:09 +02:00
Jörg Thalheim
5b900120a2
Merge pull request #13117 from NixOS/file-pure-eval
Complain when using --pure-eval with --file
2025-05-01 10:26:41 +02:00
Eelco Dolstra
d46f741cdf Complain when using --pure-eval with --file
This never worked and cannot work because in pure eval mode, the
evaluator doesn't have access to the file.
2025-04-30 22:29:27 +02:00
Eelco Dolstra
c92cb4c130 Tagging release 2.28.3
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmgRLc8THGVkb2xzdHJh
 QGdtYWlsLmNvbQAKCRCBcLRybXGY3itzB/0ehHDYPXycvwpdL4MuAcroY5GgQJLz
 dGkrmv9tMQXERqjnqd86LW6BgKwG3UY12xFMeFgYQyV/TzC6iwZUgI+Kr+baFMhH
 JoEXgLTXRwnyC54mXUGPrX6P9MwPBoUpAClaG5iH9SCV70Z/PLuXsd4/HoDmLxsi
 tVCTxoq9kn7o/YAMOQGY3KTfM26LqEPOv2vTco2ETEnNqSXCjUJ/MniMdTGCsTxy
 rdWqel95EuIb0qsMSRPrVV6xmx/KjamTSzdCcXWQbpAu4xjUyacnjL3XpGWkMUKV
 HKtbNdXboHwJgtwe66HMCgtfWPB6JCamMRm+h/b6BrTTz46eJWiaG/KW
 =Exmm
 -----END PGP SIGNATURE-----

Merge tag '2.28.3' into sync-2.28.3

Tagging release 2.28.3
2025-04-30 17:45:27 +02:00
Jeremy Fleischman
ba6b617e75
Add nix formatter build command
`nix formatter build` is sort of like `nix build`: it builds, links, and
prints a path to the formatter program:

    $ nix formatter build
    /nix/store/cb9w44vkhk2x4adfxwgdkkf5gjmm856j-treefmt/bin/treefmt

Note that unlike `nix build`, this prints the full path to the program,
not just the store path (in the example above that would be
`/nix/store/cb9w44vkhk2x4adfxwgdkkf5gjmm856j-treefmt`).

Motivation
----------

I maintain a vim plugin that automatically runs `nix fmt` on files on
save. Since `nix fmt` can be quite slow due to nix evaluation, I choose
to cache the `nix fmt `entrypoint. This was very awkward to do, see the
implementation for details:
7864607231/lua/null-ls/builtins/formatting/nix_flake_fmt.lua (L83-L110).

I recently discovered that my implementation was buggy (it didn't handle
flakes that expose a `formatter` package, such as nixpkgs), so I had to
rework the implementation:
https://github.com/nvimtools/none-ls.nvim/pull/272.

With the new `nix formatter build` command, I can delete all this akward
code, and it will be easier for other folks to build performant editor
integrations for `nix fmt`.
2025-04-29 18:40:02 -07:00
Jeremy Fleischman
5ea7b97147
refactor: create a new nix formatter run command alias for nix fmt
This refactor shouldn't change much except add a new `nix formatter run`
command. This creates space for the new `nix formatter build` command,
which I'll be introducing in the next commit.
2025-04-29 18:40:02 -07:00
Jörg Thalheim
709f05989d tests/flakes: add regression test for resolving user flakes
(cherry picked from commit 6405d6822d)
2025-04-25 13:32:13 +02:00
Eelco Dolstra
dfbb52e6bd lockFlake(): Allow registry lookups for the top-level flake
Fixes #13050.

(cherry picked from commit 68de26d38a)
2025-04-25 13:31:24 +02:00
Jörg Thalheim
6405d6822d tests/flakes: add regression test for resolving user flakes 2025-04-25 10:34:41 +02:00
Eelco Dolstra
68de26d38a lockFlake(): Allow registry lookups for the top-level flake
Fixes #13050.
2025-04-24 18:59:10 +02:00
Eelco Dolstra
dda265f09a Reapply "Actually ignore system/user registries during locking"
This reverts commit 3b5f0d9fb3.
2025-04-24 17:33:27 +02:00
Eelco Dolstra
9d87ab1dc8 Add a setting to enable lazy trees 2025-04-24 16:16:28 +02:00
Jörg Thalheim
04fcc879e6 Revert "Actually ignore system/user registries during locking"
This reverts commit 77d4316353.

(cherry picked from commit 3b5f0d9fb3)
2025-04-24 11:34:57 +00:00
Jörg Thalheim
3b5f0d9fb3 Revert "Actually ignore system/user registries during locking"
This reverts commit 77d4316353.
2025-04-24 11:28:11 +02:00