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
Sergei Zimmerman
e73fcf7b53
libexpr: Use proxy ListView for all Value list accesses
...
This also makes it possible to make `payload` field private
in the `ValueStorage` class template.
2025-07-02 21:57:02 +03:00
Eelco Dolstra
5879ab1577
Merge pull request #13400 from NixOS/fix-deep-overrides
...
Fix deep flake input overrides
2025-07-01 19:34:55 +02:00
Sergei Zimmerman
75412ebc30
libflake: Remove unused maybeParseFlakeRef and maybeParseFlakeRefWithFragment
...
These wrappers don't seem to be used anywhere in and out of tree.
Also the declaration in the header has an incorrect function name `maybeParseFlake`.
Closes #11948
2025-06-27 23:33:54 +03: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
7c0ea143d8
Fix deep overrides
...
An override like
inputs.foo.inputs.bar.inputs.nixpkgs.follows = "nixpkgs";
implicitly set `inputs.foo.inputs.bar` to `flake:bar`, which led to an
unexpected error like
error: cannot find flake 'flake:bar' in the flake registries
We now no longer create a parent override (like for `foo.bar` in the
example above) if it doesn't set an explicit ref or follows
attribute. We only recursively apply its child overrides.
Fixes https://github.com/NixOS/nix/issues/8325 , https://github.com/DeterminateSystems/nix-src/issues/95 , https://github.com/NixOS/nix/issues/12083 , https://github.com/NixOS/nix/issues/5790 .
2025-06-26 12:56:39 +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
Luc Perkins
d6710b4c04
Merge remote-tracking branch 'upstream/master' into messages-present-tense
2025-06-18 08:24:23 -07:00
Sergei Zimmerman
6587e7bcff
libexpr: Add and use lambda getter
2025-06-12 19:42:50 +00: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
a572c94333
Fix deep overrides
...
An override like
inputs.foo.inputs.bar.inputs.nixpkgs.follows = "nixpkgs";
implicitly set `inputs.foo.inputs.bar` to `flake:bar`, which led to an
unexpected error like
error: cannot find flake 'flake:bar' in the flake registries
We now no longer create a parent override (like for `foo.bar` in the
example above) if it doesn't set an explicit ref or follows
attribute. We only recursively apply its child overrides.
Fixes https://github.com/NixOS/nix/issues/8325 , https://github.com/DeterminateSystems/nix-src/issues/95 , https://github.com/NixOS/nix/issues/12083 , https://github.com/NixOS/nix/issues/5790 .
2025-06-12 20:32:58 +02:00
Luc Perkins
ab10fddc6e
Rework future tense in user-facing messages
2025-06-12 09:07:36 -07:00
Luc Perkins
a989a23d1a
Fix some instances of 'will'
2025-06-06 10:51:58 -07:00
Seth Flynn
fcdffffa37
lockFlake(): Allow registry lookups for overridden inputs
...
Fixes #13144
(cherry picked from commit d0a2323829 )
2025-06-06 08:12:20 +00:00
Seth Flynn
d0a2323829
lockFlake(): Allow registry lookups for overridden inputs
...
Fixes #13144
2025-05-28 00:24:41 -04:00
Sergei Zimmerman
114de63d88
Fix various typos in source code
...
This only touches code comments, class names, documentation,
enumeration names and tests.
2025-05-25 20:14:11 +00:00
Sergei Zimmerman
8ee513379a
Use StringMap instead of std::map<std::string, std::string> throughout the codebase
2025-05-19 20:33:28 +00: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
46beb9af76
Use correct parent outPath for relative path inputs
...
Ensure relative path inputs are relative to the parent node's _actual_
`outPath`, instead of the subtly different `sourceInfo.outPath`.
Additionally, non-flake inputs now also have a `sourceInfo` attribute.
This fixes the relationship between `self.outPath` and
`self.sourceInfo.outPath` in some edge cases.
Fixes #13164
2025-05-18 00:38:17 +01:00
Eelco Dolstra
efcb9e36a9
Remove global fetcher cache
...
The cache is now part of fetchers::Settings.
2025-05-17 19:54:32 +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
d00682beb2
Backward compatibility hack for dealing with dir in URL-style flakerefs
2025-05-09 10:10:42 +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
577b331464
Merge remote-tracking branch 'detsys/detsys-main' into lazy-trees-v2
2025-05-06 19:09:09 +02:00
Sergei Zimmerman
d8c97d8073
treewide: Use StringSet alias consistently instead of std::set<std::string>
...
The intention is to switch to transparent comparators from N3657 for
ordered set containers for strings and using the alias consistently
would simplify things.
2025-05-02 17:40:29 +00:00
Jörg Thalheim
5b59be914d
Replace symlink_exists with pathExists
...
As it turns out the orignal implementation of symlink_exists cannot be
used in Nix because it did now std::filesystem::filesystem_error.
The new implementation fixes that but is now actually the same as
pathExists except for the path type.
2025-05-01 14:22:35 +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
Eelco Dolstra
a9c1751e2f
Update src/libflake/flake/flake.cc
...
Co-authored-by: Graham Christensen <graham@grahamc.com>
2025-04-25 21:51:32 +02:00
Eelco Dolstra
ca1b2dc617
Warn against the use of indirect flakerefs in flake inputs
2025-04-25 21:16:27 +02:00
Eelco Dolstra
953ec00794
getFlake(): Don't use registries for refetching
...
`newLockedRef` is already resolved so there is no need to re-resolve
it.
2025-04-25 13:46:42 +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
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
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
Eelco Dolstra
5a2ee1b952
Move libflake/flake/* to libflake
...
(cherry picked from commit bc67e47298 )
2025-04-23 19:06:03 +00:00
Eelco Dolstra
bc67e47298
Move libflake/flake/* to libflake
2025-04-23 17:20:42 +02:00
Eelco Dolstra
182edb4dee
Move mountInput into EvalState
2025-04-23 13:53:29 +02:00
Eelco Dolstra
a6faa69fc8
Merge remote-tracking branch 'detsys/detsys-main' into lazy-trees-tmp
2025-04-23 12:25:28 +02:00
Eelco Dolstra
9574d3938f
Tagging release 2.28.2
...
-----BEGIN PGP SIGNATURE-----
iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmgA7TQTHGVkb2xzdHJh
QGdtYWlsLmNvbQAKCRCBcLRybXGY3l0rB/0c5l5EhZUAMvjnUhug8+6/g6fLLisS
ehrP9FxrjV5D2lO3EQcsBgW3bYzOwbcubuPBq8yPMlSLpf+uiAV1qxSKFGD3pnpZ
6o7K3P3kaohFl6JL5oEn9yTGgm1EubYpW3c9zO8yaL32Jknjm44bD4mKr5Rz18jI
YUfe1xDeYCwRY7YMrBKGwU2v/tlsjMX9XQlHuKPSx8uVA/UgxJk/41dIdzb0rhw5
ueuKO2GEEMd/iV5lCEVFnk1WJoHru1fqTDAqRhDZJjFVbguYAIl7OQFQuBbtG3hv
6SFC0iy/IoSrj9tRwSV+4wQU5fk6Gw2IYQlIw6VSx6xIydf46AjomPjX
=xUfr
-----END PGP SIGNATURE-----
Merge tag '2.28.2' into detsys-main
Tagging release 2.28.2
2025-04-17 16:58:05 +02: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
Robert Hensing
671364748c
call-flake.nix: allNodes.${key} -> allNodes.${key}.result
...
(cherry picked from commit 9de9410f29 )
2025-04-15 11:52:45 +00:00
Robert Hensing
9a969e29cf
call-flake.nix: refactor: Bring mapAttrs into scope
...
(cherry picked from commit 674375b021 )
2025-04-15 11:52:45 +00:00
Jörg Thalheim
99a16c5203
Merge pull request #13026 from roberth/issue-13018
...
CI / eval (push) Waiting to run
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Waiting to run
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Waiting to run
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Blocked by required conditions
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Blocked by required conditions
CI / Check Docker secrets present for installer tests (push) Waiting to run
CI / docker_push_image (push) Blocked by required conditions
CI / vm_tests (push) Waiting to run
CI / flake_regressions (push) Blocked by required conditions
Fix issue #13018 , `sourceInfo` strict in `outputs`
2025-04-15 13:51:02 +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
9de9410f29
call-flake.nix: allNodes.${key} -> allNodes.${key}.result
2025-04-15 13:22:53 +02:00
Robert Hensing
674375b021
call-flake.nix: refactor: Bring mapAttrs into scope
2025-04-15 13:22:53 +02:00