mirrexagon / nixpkgs-esp-dev

Nix flake and overlay for ESP8266 and ESP32 development.
Creative Commons Zero v1.0 Universal
144 stars 72 forks source link

Fix "idf.py create-project" failures due to read-only files #54

Closed electric-castle closed 5 months ago

electric-castle commented 5 months ago

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.

mirrexagon commented 5 months ago

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.