From dc253552dbde8d18b94de19909c5cdb23190ffdb 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/esp-idf/default.nix b/pkgs/esp-idf/default.nix index 80ab65c..524e12b 100644 --- a/pkgs/esp-idf/default.nix +++ b/pkgs/esp-idf/default.nix @@ -120,6 +120,12 @@ stdenv.mkDerivation rec { dontUseNinjaCheck = true; installPhase = '' + # make esp-idf cmake git version detection happy + 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" + mkdir -p $out cp -rv . $out/