mirrexagon / nixpkgs-esp-dev

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

`idf.py` can't get Git revision to report version #5

Open mirrexagon opened 2 years ago

mirrexagon commented 2 years ago

Running idf.py --version complains that Git can't get the version.

$ idf.py --version
fatal: not a git repository: '/nix/store/zxyj5pafs2v9dbc1ij30zxg00cyi20a9-esp-idf-v4.3.1/.git'
WARNING: Git version unavailable, reading from source
ESP-IDF v4.3.1

Probably can be ultimately solved by using the deepClone option in fetchFromGitHub in pkgs/esp-idf/default.nix (just leaveDotGit doesn't work because no tags are present I think, Git "cannot describe anything") and making sure to copy the .git directory to $out, but that causes problems fetching/checking out the repository.

This would change all the esp-idf hashes, so they have to be updated in:

Needs more investigation. We still do get a version number regardless at the moment.

mirrexagon commented 1 year ago

There is also a similar problem when building a project - cannot use git describe to get version information. I'm not sure if that is related to this, since the latter presumably is about the project, not ESP-IDF itself.

knightpp commented 12 months ago

I cannot build rust project because it complains about absence of git repository. And I think I cannot force it to skip the check.

  --- stderr
  Build configuration: BuildConfig {
      esp_idf_tools_install_dir: None,
      esp_idf_sdkconfig: None,
      esp_idf_sdkconfig_defaults: None,
      mcu: Some(
          "esp32c3",
      ),
      native: NativeConfig {
          esp_idf_version: Some(
              Tag(
                  "v5.1",
              ),
          ),
          esp_idf_repository: None,
          esp_idf_cmake_generator: None,
          idf_path: Some(
              "/nix/store/g2s0fiybk9y5p9yiw9v3yvp2gyn7xi98-esp-idf-v5.1",
          ),
          extra_components: [],
          esp_idf_components: None,
      },
      esp_idf_sys_root_crate: None,
  }
  fatal: not a git repository (or any of the parent directories): .git
  fatal: not a git repository (or any of the parent directories): .git
  Error: '/nix/store/g2s0fiybk9y5p9yiw9v3yvp2gyn7xi98-esp-idf-v5.1' is not a git respository

  Caused by:
      0: command 'cd "/nix/store/g2s0fiybk9y5p9yiw9v3yvp2gyn7xi98-esp-idf-v5.1" && LANGUAGE="" LC_ALL="C.UTF-8" "git" "rev-parse" "--show-toplevel"' exited with non-zero status code 128
      1: fatal: not a git repository (or any of the parent directories): .git
simisimis commented 10 months ago

I entered the shell through nix develop github:mirrexagon/nixpkgs-esp-dev#esp32c6-idf then did cargo generate esp-rs/esp-idf-template cargo cd to a generated project and tried doing cargo build and I am getting to the same not a git ... error It's a pity because this repo is so neatly laid out

torbeneims commented 8 months ago

I cannot build the hello_world example. Has anyone managed to do that yet? The idf complains about git describe: Could not use 'git describe' to determine PROJECT_VER, as mentioned above.

Here's a full log:

torben@torbens-xps ~/i/idf-nix (main)> nix develop github:mirrexagon/nixpkgs-esp-dev#esp32-idf

[torben@torbens-xps:~/iot/idf-nix]$ cp $IDF_PATH/examples/get-started/hello_world -r .

[torben@torbens-xps:~/iot/idf-nix]$ cd hello_world/

[torben@torbens-xps:~/iot/idf-nix/hello_world]$ chmod +w .

[torben@torbens-xps:~/iot/idf-nix/hello_world]$ idf.py build
Executing action: all (aliases: build)
Running cmake in directory /home/torben/iot/idf-nix/hello_world/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/nix/store/k13a1nbhdnm607pk33mq3xzirmp11sk9-python3-3.10.12-env/bin/python3.10 -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/torben/iot/idf-nix/hello_world"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: /nix/store/y0gvg44jdsbn8hnnr27ixjf102nk7a9x-git-2.41.0/bin/git (found version "2.41.0") 
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
fatal: not a git repository (or any of the parent directories): .git
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /nix/store/804azw62j381cvy6c84dhrrxhlby1ly6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/804azw62j381cvy6c84dhrrxhlby1ly6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/804azw62j381cvy6c84dhrrxhlby1ly6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at build/CMakeFiles/git-data/grabRef.cmake:48 (file):
  file failed to open for reading (No such file or directory):

    /home/torben/iot/idf-nix/hello_world/build/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/third_party/GetGitRevisionDescription.cmake:83 (include)
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/third_party/GetGitRevisionDescription.cmake:93 (get_git_head_revision)
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/project.cmake:78 (git_describe)
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/project.cmake:543 (__project_get_revision)
  CMakeLists.txt:6 (project)

-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/torben/iot/idf-nix/hello_world/sdkconfig
Compiler supported targets: xtensa-esp32-elf

-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: /nix/store/k13a1nbhdnm607pk33mq3xzirmp11sk9-python3-3.10.12-env/bin/python3.10 (found version "3.10.12") found components: Interpreter 
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "hello_world" version: 1
-- Adding linker script /home/torben/iot/idf-nix/hello_world/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/app_trace /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/app_update /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/bootloader /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/bootloader_support /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/bt /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/cmock /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/console /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/cxx /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/driver /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/efuse /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp-tls /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_adc /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_app_format /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_coex /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_common /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_eth /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_event /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_gdbstub /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_hid /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_http_client /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_http_server /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_https_ota /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_https_server /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_hw_support /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_lcd /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_local_ctrl /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_mm /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_netif /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_netif_stack /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_partition /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_phy /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_pm /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_psram /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_ringbuf /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_rom /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_system /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_timer /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esp_wifi /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/espcoredump /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/esptool_py /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/fatfs /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/freertos /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/hal /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/heap /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/http_parser /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/idf_test /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/ieee802154 /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/json /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/log /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/lwip /home/torben/iot/idf-nix/hello_world/main /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/mbedtls /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/mqtt /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/newlib /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/nvs_flash /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/openthread /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/partition_table /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/perfmon /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/protobuf-c /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/protocomm /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/pthread /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/sdmmc /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/soc /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/spi_flash /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/spiffs /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/tcp_transport /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/ulp /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/unity /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/usb /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/vfs /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/wear_levelling /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/wifi_provisioning /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/wpa_supplicant /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/components/xtensa
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /home/torben/iot/idf-nix/hello_world/build/log/idf_py_stderr_output_97101 and /home/torben/iot/idf-nix/hello_world/build/log/idf_py_stdout_output_97101
cyber-murmel commented 6 months ago

I don't know if this is applicable to other build error, but I notices that idf.py fails if it's run in a git repo (i.e. .git in a parent dir) that doesn't have any commits yet. My workaround was to delete the .git dir to git init later, when I'm ready to commit.

cyber-murmel commented 6 months ago

I tried to reproduce this on manjaro, following the official install instructions, but there it seems to work fine in an empty git repo.

jonahbron commented 5 months ago

I filed a bug against this upstream in esp-idf, it might be something that could make sense to fix there, even if we can get a workaround on this side.

https://github.com/espressif/esp-idf/issues/13345

mirrexagon commented 5 months ago

@torbeneims

I cannot build the hello_world example. Has anyone managed to do that yet? The idf complains about git describe: Could not use 'git describe' to determine PROJECT_VER, as mentioned above.

Here's a full log:

[...]

Mostly the Git errors don't actually seem to stop the build, but in your case CMake throws an error that might be what stops the build:

CMake Error at build/CMakeFiles/git-data/grabRef.cmake:48 (file):
  file failed to open for reading (No such file or directory):

    /home/torben/iot/idf-nix/hello_world/build/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/third_party/GetGitRevisionDescription.cmake:83 (include)
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/third_party/GetGitRevisionDescription.cmake:93 (get_git_head_revision)
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/project.cmake:78 (git_describe)
  /nix/store/zw16dh8ns3brx9xx4jmqb731cr72dxa3-esp-idf-v5.1.2/tools/cmake/project.cmake:543 (__project_get_revision)
  CMakeLists.txt:6 (project)

If I run the same commands you did on NixOS, I get a successful build, and that file git-data/head-ref it complains about in your log doesn't exist for me at all after the build. Unfortunately I don't really know how this works - I'm looking through the other comments and related issues and PRs now, which might have some clues.

My console output from successful build ``` offline/tmp/idf-nix ❯ nix develop github:mirrexagon/nixpkgs-esp-dev#esp32-idf [mir@garnet:~/code/offline/tmp/idf-nix]$ cp $IDF_PATH/examples/get-started/hello_world -r . [mir@garnet:~/code/offline/tmp/idf-nix]$ cd hello_world/ [mir@garnet:~/code/offline/tmp/idf-nix/hello_world]$ chmod +w . [mir@garnet:~/code/offline/tmp/idf-nix/hello_world]$ idf.py build Executing action: all (aliases: build) Running cmake in directory /home/mir/code/offline/tmp/idf-nix/hello_world/build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/nix/store/y6f09a574y2fnl87p446hdiba06xyrqw-python3-3.11.7-env/bin/python3.11 -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/mir/code/offline/tmp/idf-nix/hello_world"... -- IDF_TARGET not set, using default target: esp32 -- Found Git: /nix/store/za04kin80ybavb7qp577dghpax4mf82z-git-2.43.0/bin/git (found version "2.43.0") -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' fatal: not a git repository (or any of the parent directories): .git -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: /nix/store/5wgfn6g2hx0w65yp5win09pgvnh83gd6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-gcc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /nix/store/5wgfn6g2hx0w65yp5win09pgvnh83gd6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /nix/store/5wgfn6g2hx0w65yp5win09pgvnh83gd6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' -- Could not use 'git describe' to determine PROJECT_VER. -- Building ESP-IDF components for target esp32 -- Project sdkconfig file /home/mir/code/offline/tmp/idf-nix/hello_world/sdkconfig Compiler supported targets: xtensa-esp32-elf -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of time_t -- Check size of time_t - done -- Found Python3: /nix/store/y6f09a574y2fnl87p446hdiba06xyrqw-python3-3.11.7-env/bin/python3.11 (found version "3.11.7") found components: Interpreter -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success -- App "hello_world" version: 1 -- Adding linker script /home/mir/code/offline/tmp/idf-nix/hello_world/build/esp-idf/esp_system/ld/memory.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_system/ld/esp32/sections.ld.in -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa -- Component paths: /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/app_trace /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/app_update /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader_support /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bt /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/cmock /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/console /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/cxx /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/driver /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/efuse /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp-tls /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_adc /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_app_format /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_coex /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_common /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_eth /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_event /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_gdbstub /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_hid /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_http_client /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_http_server /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_https_ota /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_https_server /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_hw_support /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_lcd /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_local_ctrl /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_mm /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_netif /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_netif_stack /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_partition /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_phy /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_pm /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_psram /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_ringbuf /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_system /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_timer /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_wifi /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/espcoredump /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esptool_py /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/fatfs /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/freertos /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/hal /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/heap /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/http_parser /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/idf_test /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/ieee802154 /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/json /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/log /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/lwip /home/mir/code/offline/tmp/idf-nix/hello_world/main /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/mbedtls /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/mqtt /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/newlib /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/nvs_flash /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/openthread /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/partition_table /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/perfmon /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/protobuf-c /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/protocomm /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/pthread /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/sdmmc /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/soc /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/spi_flash /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/spiffs /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/tcp_transport /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/ulp /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/unity /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/usb /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/vfs /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/wear_levelling /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/wifi_provisioning /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/wpa_supplicant /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/xtensa -- Configuring done (2.9s) -- Generating done (0.2s) -- Build files have been written to: /home/mir/code/offline/tmp/idf-nix/hello_world/build Running ninja in directory /home/mir/code/offline/tmp/idf-nix/hello_world/build Executing "ninja all"... [3/900] Generating ../../partition_table/partition-table.binPartition table binary generated. Contents: ******************************************************************************* # ESP-IDF Partition Table # Name, Type, SubType, Offset, Size, Flags nvs,data,nvs,0x9000,24K, phy_init,data,phy,0xf000,4K, factory,app,factory,0x10000,1M, ******************************************************************************* [377/900] Performing configure step for 'bootloader'-- Found Git: /nix/store/za04kin80ybavb7qp577dghpax4mf82z-git-2.43.0/bin/git (found version "2.43.0") -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' fatal: not a git repository (or any of the parent directories): .git -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: /nix/store/5wgfn6g2hx0w65yp5win09pgvnh83gd6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-gcc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /nix/store/5wgfn6g2hx0w65yp5win09pgvnh83gd6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /nix/store/5wgfn6g2hx0w65yp5win09pgvnh83gd6-xtensa-esp32-elf-esp-idf-v5.1.2/bin/xtensa-esp32-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' -- Could not use 'git describe' to determine PROJECT_VER. -- Building ESP-IDF components for target esp32 -- Project sdkconfig file /home/mir/code/offline/tmp/idf-nix/hello_world/sdkconfig Compiler supported targets: xtensa-esp32-elf -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of time_t -- Check size of time_t - done -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld -- App "bootloader" version: 1 -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader/subproject/main/ld/esp32/bootloader.ld -- Adding linker script /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld -- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa -- Component paths: /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader_support /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/efuse /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_app_format /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_common /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_hw_support /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_rom /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esp_system /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esptool_py /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/freertos /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/hal /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/log /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader/subproject/main /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/bootloader/subproject/components/micro-ecc /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/newlib /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/partition_table /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/soc /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/spi_flash /nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/xtensa -- Configuring done (3.6s) -- Generating done (0.0s) -- Build files have been written to: /home/mir/code/offline/tmp/idf-nix/hello_world/build/bootloader [103/104] Generating binary image from built executableesptool.py v4.6.2 Creating esp32 image... Merged 1 ELF section Successfully created esp32 image. Generated /home/mir/code/offline/tmp/idf-nix/hello_world/build/bootloader/bootloader.bin [104/104] cd /home/mir/code/offline/tmp/idf-nix/hello_world/build/bootloader/esp-idf/esptool_py && /nix/s...t 0x8000 bootloader 0x1000 /home/mir/code/offline/tmp/idf-nix/hello_world/build/bootloader/bootloader.binBootloader binary size 0x6820 bytes. 0x7e0 bytes (7%) free. [899/900] Generating binary image from built executableesptool.py v4.6.2 Creating esp32 image... Merged 2 ELF sections Successfully created esp32 image. Generated /home/mir/code/offline/tmp/idf-nix/hello_world/build/hello_world.bin [900/900] cd /home/mir/code/offline/tmp/idf-nix/hello_world/build/esp-idf/esptool_py && /nix/store/y6f09a.../partition_table/partition-table.bin /home/mir/code/offline/tmp/idf-nix/hello_world/build/hello_world.binhello_world.bin binary size 0x2adf0 bytes. Smallest app partition is 0x100000 bytes. 0xd5210 bytes (83%) free. Project build complete. To flash, run this command: /nix/store/y6f09a574y2fnl87p446hdiba06xyrqw-python3-3.11.7-env/bin/python3.11 ../../../../../../../nix/store/qlq76kqz03mah3wamkswpjicqwvyndq3-esp-idf-v5.1.2/components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello_world.bin or run 'idf.py -p (PORT) flash' ```

Thank you all for your work and input on this!