Skip to content

Nix-update is using old version to calculate source hash #537

@Antares0982

Description

@Antares0982

I'm using nix-update in my project to update hash, but recently I found that nix-update is using the old version to calculate new hash. It took a long time to determine that the issue originated in nix-update, because each test build in the workflow succeeded even though the source hash was completely incorrect.

I've created a new branch dev to reproduce this: dev, at 9b187e. Use nix run github:Mic92/nix-update -- --flake geosite to update the geosite hash.

when updating geosite from 202601202217 to 202601232213, the expected hash for version 202601232213 is

sha256-VwV0jJsr+jMk5NFzct3AFP/IHO2x1ZomTVHSaWIeg7s=

while hash for 202601202217 is

sha256-0CzZ0FxdRivoIbwGfWwPsXPyCDzvBmQq0hrHxyeZ1N0=

and that is what nix-update gives. (BTW the sha256-gGOPZn+hOsUSOSSFxTLbrPyUQO9m7j5La2mF7RtXoAg= in this commit is the hash of previous version 202601192216)

After git bisect I found that 822751 in nix-update is the first bad commit. You can verify this by running test.sh in my repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions