By simply adding cp -r ./ $out to postInstall, you will find the previous
substitution does not work at all, this is documented in Nixpkgs manual,
that for substituteAll, "Environment variables that start with an uppercase
letter or an underscore are filtered out".