-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lockfile is "unstable" #5609
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-fix-a-nar-hash-mismatch/16594/16 |
This still happens with To summarize what I wrote in the linking discourse thread: My assumption is, that this is related to me pinning My (current) pins (regarding nixpkgs):
(The first entry is actually what the |
I've been observing the same issue so I wrote a #!/usr/bin/env bash
# shellcheck shell=bash
set -x
FLAKE_DIR=~/misc/nixos-config
SHOULD_NOT_EXIST="nixpkgs_6"
nix build . || exit 125
if [[ -f $FLAKE_DIR/flake.lock ]]; then
rm $FLAKE_DIR/flake.lock || exit 125
fi
env -u GIT_DIR nix run . -- flake metadata $FLAKE_DIR --json || exit 125
env -u GIT_DIR nix run . -- flake metadata $FLAKE_DIR --json | jq -e ".locks.nodes.\"$SHOULD_NOT_EXIST\""
EXIT_CODE=$?
if [[ $EXIT_CODE -eq 0 ]]; then
exit 1
else
exit 0
fi
|
It's not possible in general to know in computeLocks, relative to which path the follows was intended to be. So, we always resolve follows to their absolute states when we encounter them (which can either be in parseFlakeInput or computeLocks' fake input population). Fixes NixOS#6013 Fixes NixOS#5609 Fixes NixOS#5697 (again)
Describe the bug
In one of my configurations I have the following behaviour for a couple of days now:
I do a
nix flake update --commit-lock-file
and I get a lockfile that feels correct. On the next operation that I do on the flake, the lockfile gets rewritten and some transitive inputs are locked to a path in my store.Using the tagged release 2.4 does not have the bug. I do only observe this with a recent
master
CLI (I have not "downgraded" the demon, only the CLI for testing old version behavior)Steps To Reproduce
git clone
my repository from https://github.com/nobbz/nixos-configoverhaul
nix flake update --commit-lock-file
nix flake metadata
See that now the lockfile gets updated before the metadata is shown.
Expected behavior
Lockfile isn't touched
nix-env --version
outputAdditional context
I consciously observed this behaviour about 3 days ago.
The text was updated successfully, but these errors were encountered: