Skip to content

Commit fa59c0c

Browse files
authored
Update nix lock file and check in CI that nix lock file is in sync with nix flake (#4838)
Recently, the nix flake was updated in a pull request without fully updating the respective nix lock file. This causes issues when trying to install a nix derivation from CLI, i.e. with `nix` or `kup`, without cloning the repository, as the checked out source is placed in the read-only nix store. Therefore, the nix lock file must always stay perfectly in sync with the nix flake. This pull request updates the nix lock file to be in sync again. Additionally, the flag `--no-update-lock-file` was added to CI when building the nix derivation to check that the nix lock file is actually in sync. Otherwise, CI would silently update the nix lockfile without reflecting that change in a commit. This additional sanity check could also be added to other RV repositories with CI that use nix.
1 parent 8f297f0 commit fa59c0c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/test-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ jobs:
219219
nix --version
220220
JQ=$(nix-build '<nixpkgs>' -A jq --no-link)/bin/jq
221221
export JQ
222-
k=$(nix build . --print-build-logs --json | $JQ -r '.[].outputs | to_entries[].value')
222+
k=$(nix build . --print-build-logs --json --no-update-lock-file | $JQ -r '.[].outputs | to_entries[].value')
223223
drv=$(nix-store --query --deriver "$k")
224224
nix-store --query --requisites "$drv" | cachix push k-framework
225225
- name: 'Smoke test K'

flake.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)