Hi Phil, may passing the --with-crt-dir flag at configure time helps? The Emacs 23 expression does this in configureFlags: stdenv.lib.optional (stdenv ? glibc) [ "--with-crt-dir=${stdenv.glibc}/lib" ] That should work even better than those substituteInPlace calls. I hope this helps, Peter