https://stal-ix.github.io/ and Guix, but the definitions of purity are different for them.
Yes, a very difficult problem, compilers must be pure functions with thin effectful wrappers.