I was bound to do it at some point…

#include <unistd.h>

int main(int argc, char *argv[])
{
  return execlp("emacs", "emacs", "-f", "eshell", (char *)NULL);
}
  1. Compile
  2. Install as /bin/eshell
  3. Add /bin/eshell to /etc/shells
  4. chsh