Luc Perkins
d6710b4c04
Merge remote-tracking branch 'upstream/master' into messages-present-tense
2025-06-18 08:24:23 -07:00
Vladimír Čunát
77f6b6532f
tests: fixup with jq-1.8.0
2025-06-18 10:11:50 +02:00
Luc Perkins
ab10fddc6e
Rework future tense in user-facing messages
2025-06-12 09:07:36 -07:00
gustavderdrache
d80f0fb15a
Add test for output warning to ensure stability
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-27 09:18:51 -04:00
Robert Hensing
f18af849fe
Merge pull request #13170 from MattSturgeon/fix/call-flake/rel-path
...
Use correct parent `outPath` for relative path inputs
2025-05-19 14:13:54 +02:00
Matt Sturgeon
72232bc28a
tests/functional/flakes/non-flake-inputs: Test non-flake inputs having sourceInfo
2025-05-18 00:40:09 +01:00
Robert Hensing
eaee0b4740
tests/function/flakes/relative-paths: Test #13164
2025-05-18 00:40:08 +01:00
Eelco Dolstra
824e0d51fe
Test lock file contents more precisely
2025-05-13 10:40:24 +02:00
Eelco Dolstra
d00682beb2
Backward compatibility hack for dealing with dir
in URL-style flakerefs
2025-05-09 10:10:42 +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
Jörg Thalheim
3b5f0d9fb3
Revert "Actually ignore system/user registries during locking"
...
This reverts commit 77d4316353
.
2025-04-24 11:28:11 +02:00
Robert Hensing
2109a5a206
fix: Evaluate flake parent source without evaluating its outputs
...
This requires that we refer to the `sourceInfo` instead of the
`result`. However, `sourceInfo` does not create a chain of basedir
resolution, so we add that back with `flakeDir`.
2025-04-15 13:22:53 +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
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
Eelco Dolstra
67e957b636
Apply makeNotAllowedError to empty repos
2025-04-02 19:57:49 +02:00
Jörg Thalheim
ca165f09c0
Merge pull request #12583 from ulucs/ulucs/skip-ifds
...
`nix flake show`: Skip IFDs instead of throwing
2025-03-27 11:40:49 +01:00
Uluc Sengil
fcf5966488
skip ifds in nix flake show instead of throwing
2025-03-27 11:16:35 +01:00
Shahar "Dawn" Or
23c7a45a05
stack overflow is EvalBaseError
2025-03-20 17:43:20 +00:00
Rodney Lorrimar
1bc82d1c86
tests/functional/flakes: Add test case for subflake locking
...
This adds a test case where the lockfile of a relative path flake
dependency is updated.
It was reported by a user here: https://discourse.nixos.org/t/updating-local-subflakes-inputs-when-building-root-flake/61682
I think this test case relates to issue #7730 .
Because the issue is not resolved, this test case would fail without
the `|| true` clause.
2025-03-20 13:28:05 +08:00
Eelco Dolstra
1293388039
Merge pull request #12544 from xokdvium/debugger-use-after-free
...
libexpr: Fix use-after-free of StaticEnv::up
2025-02-27 16:55:49 +01:00
Eelco Dolstra
14c9755462
nix flake archive: Recurse into relative path inputs
...
We can't ignore them entirely, since we do want to archive their
transitive inputs.
Fixes #12438 .
2025-02-24 22:10:02 +01:00
Eelco Dolstra
b4dfeafed5
nix flake archive: Skip relative path inputs
...
Fixes #12438 .
2025-02-24 15:30:30 +01:00
Sergei Zimmerman
0d5004508f
tests/functional: Add flake-based regression for debugger use-after-free
...
This is the simplest reproducer I have. It would be great to find
a repro without flakes, but I guess this should be ok for now.
2025-02-21 14:36:39 +00:00
Eelco Dolstra
b813a764e0
Merge remote-tracking branch 'origin/master' into self-input-attrs
2025-02-10 17:01:19 +01:00
Eelco Dolstra
38f391444b
Add a test for a flake referencing a flake that has inputs.self
2025-02-04 22:14:38 +01:00
Eelco Dolstra
25fcc8d1ab
Add inputs.self.submodules
flake attribute
...
This allows a flake to specify that it needs Git submodules to be
enabled (or disabled, if we ever change the default) on the top-level
flake. This requires the input to be refetched, but since the first
fetch is lazy, this shouldn't be expensive.
Currently the only attribute allowed by `inputs.self` is `submodules`,
but more can be added in the future (e.g. a `lazy` attribute to opt in
to lazy tree behaviour).
Fixes #5312 , #9842 .
2025-02-04 21:16:33 +01:00
John Ericson
f90ba3a7c1
Update tests/functional/flakes/symlink-paths.sh
2025-02-04 11:25:14 -05:00
Eelco Dolstra
3c109095de
Use 'nix flake prefetch' to get the store path of a flake
...
Future-proofing for when 'nix flake metadata' won't return a store
path anymore.
2025-02-04 15:24:50 +01:00
silvanshade
137ba71f02
Fix shellcheck lints
2025-02-03 17:47:37 -07:00
mergify[bot]
24d11d22c3
Merge pull request #12286 from stevalkr/flakes_symlink_path
...
Fix flakes follow symlinks
2025-02-02 03:11:20 +00:00
Steve Walker
453e8dc067
Fix flakes follow symlinks
...
Co-authored-by: Jan Christoph Bischko <jbischko@barracuda.com>
2025-02-02 08:30:04 +07:00
Eelco Dolstra
4113fdf2f0
Allow use of lock files with unlocked entries as long as they have a NAR hash
...
Fixes #12364 .
2025-01-31 17:03:27 +01:00
Eelco Dolstra
521667eb89
Fix follow-paths test
...
Since ff8e2fe84e
, 'path:' URLs on the
CLI are interpreted as relative to the current directory of the user,
not the path of the flake we're overriding.
2025-01-16 11:19:20 +01:00
Eelco Dolstra
550fe889ee
Merge remote-tracking branch 'origin/master' into relative-flakes
2025-01-16 11:05:10 +01:00
John Ericson
e02026adae
Merge pull request #12254 from DeterminateSystems/fix-relative-path-on-cli
...
Fix relative 'path:' flakerefs in the CLI
2025-01-15 15:19:56 -05:00
mergify[bot]
c45dfeeef3
Merge pull request #12220 from DeterminateSystems/allow-dirty-locks
...
Add setting 'allow-dirty-locks'
2025-01-15 20:18:28 +00:00
Eelco Dolstra
ff8e2fe84e
Fix relative 'path:' flakerefs in the CLI
...
And handle relative 'git+file:' flakerefs while we're at it (these
crashed with an assertion failure).
Fixes #12248 .
2025-01-14 17:30:13 +01:00
Eelco Dolstra
cd0127f957
Merge remote-tracking branch 'origin/master' into relative-flakes
2025-01-13 14:13:56 +01:00
Eelco Dolstra
e161393299
Add setting 'allow-dirty-locks'
...
This allows writing lock files with dirty inputs, so long as they have
a NAR hash. (Currently they always have a NAR hash, but with lazy
trees that may not always be the case.)
Generally dirty locks are bad for reproducibility (we can detect if
the dirty input has changed, but we have no way to fetch it except
substitution). Hence we don't allow them by default.
Fixes #11181 .
2025-01-10 17:55:30 +01:00
Robert Hensing
d9a50c0af2
Clarify cd call in tests/functional/flakes/flakes.sh
2025-01-10 09:57:54 +01:00
Bryan Lai
37ac18d1d9
tests/flake-in-submodule: git+file:./* input
2025-01-10 11:44:55 +08:00
Bryan Lai
9d088fa502
tests/flakes: check git+file:./${submodule} protocol
...
Relative, local git repo used to work (for submodules), but it
fails after 3e0129ce3b
.
This commit adds a test to prevent such failure in the future.
2025-01-10 11:37:29 +08:00
Eelco Dolstra
28caa35a97
parsePathFlakeRefWithFragment(): Handle 'path?query' without a fragment
...
Commands like `nix flake metadata '.?submodules=1'` ignored the query
part of the URL, while `nix build '.?submodules=1#foo'` did work
correctly because of the presence of the fragment part.
2025-01-08 18:38:53 +01:00
Eelco Dolstra
8534c4222c
Merge remote-tracking branch 'origin/master' into relative-flakes
2024-12-18 21:09:27 +01:00
Eelco Dolstra
757ea70644
Add a test
2024-12-17 13:13:39 +01:00
Eelco Dolstra
8b9e0f86e4
nix flake lock: Fail if there is an unlocked input
...
Since the only purpose of `nix flake lock` is to write a new lock
file, it should be a fatal error if we can't write the lock file.
2024-12-09 14:03:12 +01:00
Eelco Dolstra
0b00bf7c09
Merge remote-tracking branch 'origin/master' into relative-flakes
2024-11-22 14:44:32 +01:00
Eelco Dolstra
e122acef97
Fix VM test
2024-11-20 23:03:31 +01:00