With esp-idf 5.1.x, "idf.py create-project" fails when the esp-idf templates are in a read-only location (such as the Nix store). By default, they are copied with permissions preserved, and when idf.py attempts to update the freshly made copy of CMakeLists.txt, it fails as the file is read-only.
This change makes the copy have file permissions controlled by the umask, which typically allows writes. The template in nixpkgs is still read-only of course.
Thanks! My only concern would be if any files need to be copied as executable and the umask doesn't include executable. If this is what upstream v5.2 does, then presumably it should be fine.
With esp-idf 5.1.x, "idf.py create-project" fails when the esp-idf templates are in a read-only location (such as the Nix store). By default, they are copied with permissions preserved, and when idf.py attempts to update the freshly made copy of CMakeLists.txt, it fails as the file is read-only.
This change makes the copy have file permissions controlled by the umask, which typically allows writes. The template in nixpkgs is still read-only of course.
This has been fixed upstream in 5.2.