Closed jkachmar closed 3 years ago
Joe, these are great! As you can probably tell, I learned nix from I-have-no-idea-what-I'm-doing.pdf, so any and all improvements are welcome!
I got a new machine and don't even have nix on it at the moment, will be a good opportunity to try this out!
We should have a docker compose file inside the project to be able to test these things.
@hmemcpy glad I could help! I was going to take a look at CI a bit as well, but it looks like you’re only using Nix on Travis (not on GitHub actions).
@drupol I’m not sure I follow; do you mean a Dockerfile
that would drop somebody into an environment with Nix so they could develop in that container without having to install Nix on their own machine?
@drupol I’m not sure I follow; do you mean a
Dockerfile
that would drop somebody into an environment with Nix so they could develop in that container without having to install Nix on their own machine?
Yes exactly :-)
Hmm, I’m looking at the PDF Travis uploaded to S3 and it seems like the images didn’t get included somehow.
When I ran this locally I’m pretty sure the images were included without issue so I’m gonna have to go back and check that my changes didn’t mess anything up 😔
@drupol Makes sense! I think there might even be an open PR with some work towards this right now, but I’m not sure if it needs to be spruced up a little before it could be merged.
Hmm, I’m looking at the PDF Travis uploaded to S3 and it seems like the images didn’t get included somehow.
Have you checked the PDFs generated by Github ? https://github.com/hmemcpy/milewski-ctfp-pdf/releases/tag/f76e9d3
I will admit it's been a while since I looked, unfortunately :(
Life got in the way...
But I think I remember people complaining about the lack of images from Travis CI. I can report the GitHub-generated PDFs are fine (thanks again @drupol!)
I think the Travis build should be retired.
Makes sense.
If the Travis build is to be retired, I could have a go at adding a GitHub Action which just runs through a basic test of the Nix-based build to ensure that everything works as expected in the development environment.
A fair bit of this PR is stylistic, so feel free to reject or request significant changes if you feel I've overstepped any bounds on the project!
I wanted to build this locally, but I ran into some problems. I got a little carried away and ended up refactoring
shell.nix
a bit as well as pinning everything to a specific commit of nixpkgs in the process 😅.On the LaTeX side, it looks like the project needed
zref
,catchfile
, andimport
from CTAN; dropping those into thetexlive
bundle seemed to resolve my issues there.Since I was doing all of that anyway, I decided to go ahead and manage the two Python dependencies with Nix as well. This feels a bit nicer than managing them with virtualenv, and it would probably make it a bit easier to build this project with Nix if someone wanted to in the future.