Matt Sturgeon
beb845981b
tests/functional/flakes/non-flake-inputs: Test non-flake inputs having sourceInfo
...
(cherry picked from commit 72232bc28a )
2025-06-27 11:59:11 +00:00
Robert Hensing
a2941dc574
tests/function/flakes/relative-paths: Test #13164
...
(cherry picked from commit eaee0b4740 )
2025-06-27 11:59:11 +00:00
Eelco Dolstra
79eed1d9c4
Backward compatibility hack for dealing with dir in URL-style flakerefs
...
(cherry picked from commit d00682beb2 )
2025-05-12 20:35:46 +00: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
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
Robert Hensing
818fc68db6
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`.
(cherry picked from commit 2109a5a206 )
2025-04-15 11:52:46 +00:00
Rodney Lorrimar
080950b0fe
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.
(cherry picked from commit 1bc82d1c86 )
2025-04-09 17:20:31 +00: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
5f74cf9b7a
Apply makeNotAllowedError to empty repos
...
(cherry picked from commit 67e957b636 )
2025-04-02 18:33:03 +00:00
Shahar "Dawn" Or
3f56dd9927
stack overflow is EvalBaseError
...
(cherry picked from commit 23c7a45a05 )
2025-03-21 14:13:40 +00: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
Eelco Dolstra
671df02bf7
shellcheck
2024-11-20 23:03:31 +01:00
Eelco Dolstra
6832ee5d6f
Move non-flake input tests into a separate file
2024-11-20 19:51:04 +01:00
Eelco Dolstra
4cafea7c7b
Add a utility function for creating/registering a simple flake
2024-11-20 18:51:23 +01:00
Eelco Dolstra
e1cb905aca
Move --commit-lock-file-summary tests into a separate file
2024-11-20 18:42:33 +01:00
Eelco Dolstra
fd2df5f02f
Rename nonFlakeDir -> scriptDir
2024-11-20 18:23:20 +01:00
Eelco Dolstra
5533b0c735
Move shebang flake tests into a separate test
2024-11-20 18:08:31 +01:00
Eelco Dolstra
428af8c66f
tests/functional/flakes/develop.sh: Don't hang
...
The bash shell started by `nix develop` waited forever for stdin
input.
Fixes #11827 .
2024-11-18 16:28:12 +01:00
Eelco Dolstra
f29e7867a9
Revert "Merge pull request #11826 from DeterminateSystems/revert-11804"
...
This reverts commit aeffdeffc8 , reversing
changes made to 723fdeb4f1 .
2024-11-11 15:21:34 +01:00
Jörg Thalheim
aeffdeffc8
Merge pull request #11826 from DeterminateSystems/revert-11804
...
Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"
2024-11-08 12:04:55 +01:00
Eelco Dolstra
47bffe20e4
Revert "Merge pull request #10980 from kjeremy/flake-show-description"
...
This reverts commit 1c5ad159d6 , reversing
changes made to 67de193277 .
This reverts commit ce4e4a158e , reversing
changes made to 43e82c9446 .
2024-11-07 18:12:04 +01:00