This isn't perfect as the compiled .so files use a mixture of /usr/lib
and /nix/store paths. It'd be nice if we could figure out how to make
them use /usr/lib paths only, such that it can be used to build the
natives for other distributions.
However, even though it isn't suitable for building releases, it does
allow us to test changes to the natives on NixOS.