astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

Add nix build support #59

Closed BattleCh1cken closed 1 year ago

BattleCh1cken commented 1 year ago

This commit adds support for the nix build system in the form of a flake. This allows any contributor to be able to build the project in a reproducible manner, but more importantly allows other nix flakes to use this project as an input.

astrale-sharp commented 1 year ago

thanks! I don't know how to test if it works or whatever so I'll trust you on that one!

Just curious, does it fixes the version for nix? (cause I haven't made a release yet so, the version will necessarily be outdated quite quick)?

BattleCh1cken commented 1 year ago

The version for nix will need to manually updated, along with the hash.

BattleCh1cken commented 1 year ago

I'm realizing that the hash should not be hard coded. Don't merge this until I've fixed that.

BattleCh1cken commented 1 year ago

Should be fixed now. It should now use whatever the latest version is to build.

I've built and tested functionality on x86_64 linux, and everything seems to work just fine.

astrale-sharp commented 1 year ago

I'll go with you on this one! I imagine when we release, there may be a way to fix the hash to the release!

Thanks a lot!