nix run from the release notes fails: tag ref and missing flake.lock #45

Closed
opened 2026-10-17 16:46:45 +00:00 by littlefox · 1 comment
Owner

User report: nix run "git+https://forge.lysator.liu.se/littlefox/neokom?ref=v0.1.0" fails with "Failed to fetch git repository".

Reproduced in nixos/nix (Nix 2.35.3):

  1. A bare ref=v0.1.0 is looked up as refs/heads/v0.1.0; a tag needs ref=refs/tags/v0.1.0.
  2. With that fixed, nix stops with "cannot write modified lock file": flake.lock was never committed. CI builds from a checkout, where nix writes the lock silently, so it never noticed.

Fix: commit flake.lock, correct the release notes, and make the nix CI job fail when the lock is missing or stale.

User report: `nix run "git+https://forge.lysator.liu.se/littlefox/neokom?ref=v0.1.0"` fails with "Failed to fetch git repository". Reproduced in nixos/nix (Nix 2.35.3): 1. A bare `ref=v0.1.0` is looked up as `refs/heads/v0.1.0`; a tag needs `ref=refs/tags/v0.1.0`. 2. With that fixed, nix stops with "cannot write modified lock file": flake.lock was never committed. CI builds from a checkout, where nix writes the lock silently, so it never noticed. Fix: commit flake.lock, correct the release notes, and make the nix CI job fail when the lock is missing or stale.
Author
Owner

Merged in #46 and released in v0.1.1. Verified in nixos/nix (Nix 2.35.3): building from the git URL of the fix branch works with no flags; v0.1.0 builds with --no-write-lock-file. CI: the nix job now builds with --no-update-lock-file, and tools/check-version.sh checks the five version files.

Merged in #46 and released in v0.1.1. Verified in nixos/nix (Nix 2.35.3): building from the git URL of the fix branch works with no flags; v0.1.0 builds with --no-write-lock-file. CI: the nix job now builds with --no-update-lock-file, and tools/check-version.sh checks the five version files.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#45
No description provided.