kudrykv / latex-yearly-planner

Digital planner for Supernote and ReMarkable // Support Ukraine 🇺🇦 https://savelife.in.ua/en
https://github.com/kudrykv/latex-yearly-planner/discussions
MIT License
1.11k stars 162 forks source link

Define environment as nix flake and build in GitHub workflow #78

Closed charlesbaynham closed 1 year ago

charlesbaynham commented 1 year ago

Thanks for an awesome package! The dependency setup was a bit fiddly and might put people off developing, so I've added a Nix flake which allows you to create a temporary environment with all dependencies pre-packaged. Building the package now becomes just a call to

nix build

I've also added a github workflow which builds the pdf automatically in the Github CI. It's currently always building the 2023 file, but that could be changed easily enough if you prefer.

charlesbaynham commented 1 year ago

By the way, I'm not familiar enough with this project yet to know if compiling just the 2023 pdf with default options is a useful thing to do. I'm experienced in Nix and latex however, so if you tell me what would be a useful set of pdfs to compile I could adapt this PR to build those instead / as well.

kudrykv commented 1 year ago

@charlesbaynham big <3 for the PR!

Default configs are definitely useful, although they represent only one possible configuration setup.

The first thing is LaTeX, which takes tens to hundreds of seconds to compile. Then the second thing is a sort of growing variety of possible setups, with which combinations setups grow exponentially.

Saying that, running one config to check that everything is fine should be well enough

charlesbaynham commented 1 year ago

In that case, I think this PR is ready - it builds a test pdf which should catch most bugs, and also defines a devShell so people can spin up a development environment with just one line and start contributing immediately.