Age | Commit message (Collapse) | Author |
|
Make --repair-path also repair corrupt optimised links
|
|
There already existed a smoke test for the link content length,
but it appears that there exists some corruptions pernicious enough
to replace the file content with zeros, and keeping the same length.
--repair-path now goes as far as checking the content of the link,
making it true to its name and actually repairing the path for such
coruption cases.
|
|
|
|
|
|
allow paths in flake local options
|
|
|
|
nixpkgs can save a good bit of eval memory with this primop. zipAttrsWith is
used quite a bit around nixpkgs (eg in the form of recursiveUpdate), but the
most costly application for this primop is in the module system. it improves
the implementation of zipAttrsWith from nixpkgs by not checking an attribute
multiple times if it occurs more than once in the input list, allocates less
values and set elements, and just avoids many a temporary object in general.
nixpkgs has a more generic version of this operation, zipAttrsWithNames, but
this version is only used once so isn't suitable for being the base of a new
primop. if it were to be used more we should add a second primop instead.
|
|
flake.cc: computeLocks: Only verify overrides when they could change
|
|
|
|
When we check for disappeared overrides, we can get "false positives"
for follows and overrides which are defined in the dependencies of the
flake we are locking, since they are not parsed by
parseFlakeInputs. However, at that point we already know that the
overrides couldn't have possible been changed if the input itself
hasn't changed (since we check that oldLock->originalRef == *input.ref
for the input's parent). So, to prevent this, only perform this check
when it was possible that the flake changed (e.g. the flake we're
locking, or a new input, or the input has changed and mustRefetch ==
true).
|
|
Follow-up from https://github.com/NixOS/nix/pull/5807 to fix https://github.com/NixOS/nix/pull/5807#issuecomment-1000135394
|
|
Rewrite the string taken by the IFD-like primops to contain the actual
output paths of the derivations rather than the placeholders
Fix #5805
|
|
nix-channel: use nix-env -i --remove-all to upgrade
|
|
Fix #5505
|
|
Make sure that `nix-channel --update` won’t accidentaly remove one
|
|
|
|
flakes: fix boolean and int nixConfig values
|
|
|
|
|
|
|
|
When a variable is assigned in the REPL, make sure to remove any possible reference to the old one so that we correctly pick the new one afterwards
Fix #5706
|
|
|
|
Add a :log command that shows logs for a derivation.
Closes https://github.com/NixOS/nix/issues/3504
Co-authored-by: Taeer Bar-Yam <taeer@bar-yam.me>
|
|
Previously, when we were attempting to reuse the old lockfile
information in the computeLocks function, we have passed the parent of
the current input to the next computeLocks call. This was incorrect,
since the follows are resolved relative to the parent. This caused
issues when we tried to reuse oldLock but couldn't for some
reason (read: mustRefetch is true), in that case the follows were
resolved incorrectly.
Fix this by passing the correct parent, and adding some tests to
prevent this particular regression from happening again.
Closes https://github.com/NixOS/nix/issues/5697
|
|
|
|
Fix #5259
|
|
If we’re in pure eval mode, then tell that in the error message rather
than (wrongly) speaking about restricted mode.
Fix https://github.com/NixOS/nix/issues/5611
|
|
Makes lists comparable using lexicographic comparison.
Increments builtins.langVersion in order for this change to be
detectable
|
|
The eventual PATH entry needs the `.../bin` or we will not use the right
daemon.
|
|
|
|
|
|
|
|
When an input follows disappears, we can't just reuse the old lock
file entries since we may be missing some required ones. Refetch the
input when this happens.
Closes https://github.com/NixOS/nix/issues/5289
|
|
Make the flake options work when using the daemon
|
|
Make the post-build-hook use the daemon Nix package
|
|
Fix `nix repl`’s building of CA derivations
|
|
When setting flake-local options (with the `nixConfig` field), forward
these options to the daemon in case we’re using one.
This is necessary in particular for options like `binary-caches` or
`post-build-hook` to make sense.
Fix <https://github.com/NixOS/nix/commit/343239fc8a1993f707a990c2cd54a41f1fa3de99#r44356843>
|
|
Having the `post-build-hook` use `nix` from the client package can lead
to a deadlock in case there’s a db migration to do between both, as a
`nix` command running inside the hook will run as root (and as such will
bypass the daemon), so might trigger a db migration, which will get
stuck trying to get a global lock on the DB (as the daemon that ran the
hook already has a lock on it).
|
|
When running a `:b` command in the repl, after building the derivations
query the store for its outputs rather than just assuming that they are
known in the derivation itself (which isn’t true for CA derivations)
Fix #5328
|
|
|
|
|
|
Rather than having them plain strings scattered through the whole
codebase, create an enum containing all the known experimental features.
This means that
- Nix can now `warn` when an unkwown experimental feature is passed
(making it much nicer to spot typos and spot deprecated features)
- It’s now easy to remove a feature altogether (once the feature isn’t
experimental anymore or is dropped) by just removing the field for the
enum and letting the compiler point us to all the now invalid usages
of it.
|
|
This reverts commit e31a48366f19d5fa452df6273e817a4ea5516e50. Unnecessary after 0be8cc1466f317e33977590510bac4b18471f0ce.
|
|
|
|
Using the daemon will break most of the assumptions of this test, so
it’s as simple to just disable it
|
|
|
|
The min bound written corresponds to the date of the commit that
introduced the change, but it only got merged on master some weeks
later. Since the version is essentially the commit date, that means that
there’s a whole range of commits on master (including the current
`nixUnstable`) that have a higher version but don’t contain the required
change.
|
|
- Don’t hardcode the “newer” version
- Remove an ill-placed `return`
|
|
This fixes a bug in the garbage collector where if a path
/nix/store/abcd-foo is valid, but we do a
isValidPath("/nix/store/abcd-foo.lock") first, then a negative entry
for /nix/store/abcd is added to pathInfoCache, so /nix/store/abcd-foo
is subsequently considered invalid and deleted.
|
|
This test broke the assumption that the hash parts of store paths are
unique.
|