Skip to content
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

Different hashes when download by Nix OS package manager #10

Open
arimatakao opened this issue Jan 5, 2025 · 3 comments
Open

Different hashes when download by Nix OS package manager #10

arimatakao opened this issue Jan 5, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@arimatakao
Copy link
Owner

On Nix OS run command:

nix run github:arimatakao/mdx -- download --help

Installation error because the vendorHash in nix/default.nix is not set correctly:

vendorHash = "sha256-xHN+OrqodeK2vVZjGsH88OuHVcNtLbM+B4K5Ty45q0o=";

@arimatakao arimatakao added the bug Something isn't working label Jan 5, 2025
@nikololiahim
Copy link
Contributor

This happened because the dependencies in go.mod changed. Every time go.mod is updated, the vendorHash needs to be updated in the flake.nix. Unfortunately I don't know a better way around this other than updating the flake.nix manually.

@arimatakao
Copy link
Owner Author

Ok. So, can we update the vendorHash and run a specific version? The user will at least be able to run mdx on Nix.

nix run github:arimatakao/[email protected] -- download --help

@nikololiahim
Copy link
Contributor

nikololiahim commented Jan 14, 2025

I've done some research, turns out you can fix the version of the flake to a specific tag using the command:

nix run 'git+https://github.com/arimatakao/mdx?ref=refs/tags/v1.11.0' -- download --help

I've update #13 with the latest working version of mdx. A new tag (and an update to README.md) would be necessary to specify the new working version.

There are 2 ways to make this work: update #13 to mention the non-existent tag v1.12.4 in README.md, merge #13 and immediately create a new tag OR merge #13 as it is right now, release a new tag (v1.12.4, v1.13.0, etc) some time in the future, and then update the README.md with a new tag. The first option would mean that README.md has broken nix commands, the second option means, the second option means that the README.md has working nix commands which use and outdated version of mdx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants