Any way to build/deploy this without nix?
Currently there is no way to do that.
Since I am using a few unreleased library versions I also think you cannot really avoid Nix at the moment.
But I know that 2 things are possible with Nix:
- Building static Haskell executables
- Putting a derivation into a docker image
This way pretty much anyone could deploy this with docker. You would just need a machine with Nix to build it, but GitHub Actions can take care of that as well.
Do you mean Haskell libraries? Both cabal and stack support this just fine.
You can build static Haskell executables easily without nix as well, utilizing alpine images (ghcup and cabal do that).
I actually wasn’t aware of that. Here are the overrides I’m using.
I guess it should be possible then to build everything without Nix theoretically. I just wouldn’t encourage it at the moment.
I find it convenient to have a single build tool for a full stack project.
For example: You can clone the repository and use
nix run to build and start the server (including static files, frontend, fonts) with a single command.
If you don’t configure the binary cache it just might take a while.
But even just the fact that I can simply use a binary cache without much setup is worth a lot to me.
Reproducible (and cached) development environments are nice too (including language servers).
I don’t plan to support building without Nix in the near future.
But utilizing pkgs.dockerTools.buildImage shouldn’t be a lot of work. That way you can atleast use docker to run the server.
Fyi, cabal and stack cache build artifacts too and have tools to share them (e.g. via s3 buckets):
I guess at that point it really boils down to what one considers convenient.
Good to know that this exists though