Can nix build manylinux wheels or how to ship to other platforms?

I’d like to nix build a manylinux compliant Python wheel including a compiled python extension. Or rather, I’d like to build such a wheel so that it runs on various Linux distributions. (How) is this possible?

Manylinux achieves portability by being old, e.g. old glibc version, old compilers. But this is hard to achieve with nix, isn’t it? The only way, going forward I see currently, are compiling statically linked shared objects based on musl.

The underlying mission here is to have one build system that builds every artifact from a multi-language project including C++ executables, python packages with pybind11 based python extensions and docker images. Exe and docker is easily possible, but I’m pondering about python.

I would be thankful for every input.

1 Like