From 970f693bfaf9b20c8aabdcf6409fc60c9f76b360 Mon Sep 17 00:00:00 2001 From: Moritz Bitsch Date: Tue, 20 Feb 2024 13:01:26 +0100 Subject: [PATCH] workaround esp-idf version detection If version.txt is missing some part of the cmake toolchain tries to read refs/heads/fetchgit in the idf repo which failed. This is not a perfect solution, but works nicely when using cargo. --- pkgs/esp-idf/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/esp-idf/default.nix b/pkgs/esp-idf/default.nix index 2c8d2cf..e5a0173 100644 --- a/pkgs/esp-idf/default.nix +++ b/pkgs/esp-idf/default.nix @@ -132,5 +132,12 @@ stdenv.mkDerivation rec { # directory to PYTHONPATH. ln -s ${customPython} $out/python-env ln -s ${customPython}/lib $out/lib + + # make esp-idf cmake git version detection happy + cd $out + git init . + git config user.email "nixbld@localhost" + git config user.name "nixbld" + git commit --date="1970-01-01 00:00:00" --allow-empty -m "make idf happy" ''; }