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
8014671210
Improve build failure error messages
2025-05-09 00:32:41 +02:00
Eelco Dolstra
7c9d25cf39
Merge pull request #57 from DeterminateSystems/eelcodolstra/fh-800-assess-impact-of-flakelock-url-change-between-nix-versions
...
Canonicalize flake input URLs before checking flake.lock file staleness, for dealing with `dir` in URL-style flakerefs
2025-05-08 18:18:20 +00: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
6023688c6c
printValueAsJSON(): Don't devirtualize
...
This is already done by consumers of builtins.toJSON (like
builtins.toFile or builtins.derivation), so we can delay this until
it's actually needed.
2025-05-08 15:33:14 +02:00
Eelco Dolstra
2bbf755bee
Handle FIXMEs
2025-05-07 21:36:13 +02:00
Eelco Dolstra
0f48a152dd
Handle derivation
2025-05-07 20:56:41 +02:00
Eelco Dolstra
8739d35529
Fix tests/NixOS/nix/2.18.1
2025-05-07 19:22:14 +02:00
Eelco Dolstra
2a35d8f800
Add a special type of context for the result of toString
...
When you apply `builtins.toString` to a path value representing a path
in the Nix store (as is the case with flake inputs), historically you
got a string without context (e.g. `/nix/store/...-source`). This is
broken, since it allows you to pass a store path to a
derivation/toFile without a proper store reference. This is especially
a problem with lazy trees, since the store path is a virtual path that
doesn't exist and can be different every time.
For backwards compatibility, and to warn users about this unsafe use
of `toString`, we now keep track of such strings as a special type of
context.
2025-05-07 18:53:39 +02:00
Eelco Dolstra
df93fa8604
Merge pull request #27 from DeterminateSystems/lazy-trees-v2
...
Lazy trees v2
2025-05-07 15:03:25 +00:00
Eelco Dolstra
f6ad6291ab
nix flake metadata: Show store path if available
2025-05-07 15:56:35 +02:00
Eelco Dolstra
9bab483196
Improve error message
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2025-05-07 14:07:29 +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
gustavderdrache
fb01b8c5c9
Nits: formatting
2025-05-06 15:30:33 -04:00
gustavderdrache
d4eb6059c9
Update src/nix/upgrade-nix.cc
...
Co-authored-by: Graham Christensen <graham@grahamc.com>
2025-05-06 15:11:34 -04:00
gustavderdrache
49da034ecd
Deprecate upgrade-nix command
2025-05-06 15:05:34 -04:00
Eelco Dolstra
577b331464
Merge remote-tracking branch 'detsys/detsys-main' into lazy-trees-v2
2025-05-06 19:09:09 +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
Luc Perkins
71e735385a
Change language around guide
2025-04-28 15:39:38 -03:00
Luc Perkins
506f489dae
Remove other trailing slash
2025-04-28 15:04:29 -03:00
Luc Perkins
2e2d795b46
Remove trailing slash in Zero to Nix URL
2025-04-28 14:52:01 -03:00
Philipp Otterbein
9ba32a2981
allocate SimpleLogger before forking
...
(cherry picked from commit 4e95f662db )
2025-04-28 07:02:02 +00: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
88cd82239e
Fix the nix-community/patsh/0.2.1 flake regression test (again)
2025-04-25 16:50:02 +02:00
Eelco Dolstra
797c716f74
Suggest fix
2025-04-25 16:05:17 +02:00
Sergei Zimmerman
1c9e94789e
libutil: Add missing format arguments to UsageError ctor
...
Once again found by an automated migration to `std::format`.
I've tested that boost::format works fine with `std::string_view`
arguments.
(cherry picked from commit 9fff868e39 )
2025-04-25 13:22:58 +00:00
Eelco Dolstra
e20b0d7b29
Merge pull request #13090 from NixOS/mergify/bp/2.28-maintenance/pr-13082
...
Actually ignore system/user registries during locking (2nd attempt) (backport #13082 )
2025-04-25 14:13:27 +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
mergify[bot]
5a7cdc4373
Merge pull request #13092 from NixOS/mergify/bp/2.28-maintenance/pr-13086
...
libutil: Fix invalid boost format string in infinite symlink recursion error (backport #13086 )
2025-04-25 10:48:47 +00:00
Eelco Dolstra
17a40e5195
Warn about the use of channel URLs
2025-04-25 11:22:21 +02:00
Sergei Zimmerman
10350537b1
libutil: Fix invalid boost format string in infinite symlink recursion error
...
Found while working on an automated migration to `std::format`.
(cherry picked from commit bfb357c40b )
2025-04-25 09:21:22 +00:00
Sergei Zimmerman
b179259d6f
libutil: Use correct argument to Error format ctor
...
It seems that the intention was to format a number in base 8 (as
suggested by the %o format specifier), but `perms` is a `std::string`
and not a number. Looks like `rawMode` is the correct thing to use here.
(cherry picked from commit 1b5c8aac12 )
2025-04-25 09:19:52 +00:00
Graham Christensen
d97d311ddf
Emit a warning about channel deprecation.
2025-04-24 20:27:20 -04:00
Cole Helbling
6390b8b7cf
nix-cli: restore binary-dist artifact to Hydra static builds
...
(cherry picked from commit e1b68244ad )
2025-04-24 17:30:39 +00:00
Eelco Dolstra
2aa3655166
computeBaseName(): Respect the original store path name
2025-04-24 17:08:33 +02:00
Graham Christensen
ad7100fd6c
Merge pull request #33 from DeterminateSystems/push-qvlnukytmqwu
...
Hide the "dirty" notice when running nix develop
2025-04-24 14:43:43 +00:00
Eelco Dolstra
9d87ab1dc8
Add a setting to enable lazy trees
2025-04-24 16:16:28 +02:00
Graham Christensen
cecbb2b22c
Improve the "dirty" message, by clarifying what the jargon means
...
FH-735
2025-04-24 09:43:11 -04: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
Graham Christensen
d74acf1954
Hide the "dirty" notice when running nix develop
...
In the common case, nix develop is running against a dirty checkout of a project.
This patch removes the warning about a dirty tree on nix develop only.
Close FH-736
2025-04-23 21:29:05 -04:00
Eelco Dolstra
5a2ee1b952
Move libflake/flake/* to libflake
...
(cherry picked from commit bc67e47298 )
2025-04-23 19:06:03 +00:00
Eelco Dolstra
d3c79e2b13
Don't build MonitorFdHup on Windows
...
https://hydra.nixos.org/build/295398462
(cherry picked from commit a9b6213221 )
2025-04-23 18:23:51 +00: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
43a26916c2
unsafeGetAttrPos: Set string context on store paths
...
This is needed to devirtualize them when they get passed to a
derivation or builtins.toFile. Arguably, since this builtin is unsafe,
we could just ignore this, but we may as well do the correct thing.
2025-04-18 16:01:19 +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
John Ericson
29ae14114e
Remove stray assignment side affect in lambda
...
This was almost a bug! It wasn't simply because another assignment would
clobber it later.
(cherry picked from commit 32409dd7d7 )
2025-04-15 14:25:16 -04:00
John Ericson
30d900b313
Derivation "advanced attrs" test: Ensure fields are set to distinct values
...
We had fields set to the same values before in our test data. This is
not a problem per-se, but does mean we wouldn't catch certain mixups.
Now, the fields are set to distinct values (where possible), which makes
the test more robust.
(cherry picked from commit a0b2b75f59 )
2025-04-15 14:25:13 -04:00
Eelco Dolstra
0c0dda3b29
Devirtualize double-copied paths
...
Borrowed from the original lazy-trees branch.
2025-04-15 17:44:56 +02:00