-
Notifications
You must be signed in to change notification settings - Fork 134
Description
We should publish statically-linked binaries for our Linux releases. The reason for doing this is that various Linux distros ship different versions of some native libraries we link to, and dynamically linking means that the binary doesn't work out of the box on some of them, and people have to install dependencies with their package manager, etc etc.
It would be nice if we could instead build and publish a statically linked binary. This has been tried in the past (e.g. see #437), but failed because we were still linking to glibc, while to properly link statically we should link to musl.
The easiest way to compile Haskell statically with no hassle is probably with static-haskell-nix.
So to put this into use we should:
- add Nix to the Travis CI setup
- Nixify the build
- Use Nix in CI
- make sure that we cache the Nix stuff so CI times don't blow up
This kind of opens up the question of "why use the whole stack thing if we can just build with Nix", which is relevant because I wouldn't want to maintain two build systems that need attention when doing routine things like updating a dependency. So we could figure out a way to reduce this burden - e.g. haskell.nix might help with this?