Skip to content

Commit

Permalink
Merge branch 'fix/install_on_nixos' into 'master'
Browse files Browse the repository at this point in the history
fix(tools): Add suggestion how to install ESP-IDF on NixOS

Closes IDFGH-12839

See merge request espressif/esp-idf!31147
  • Loading branch information
dobairoland committed Jun 3, 2024
2 parents 2d8c719 + d1d8a81 commit ba60c2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/idf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,12 @@ def handle_missing_versions(
"""
Prints the info about missing tool to stderr if tool has no supported versions installed.
"""
fatal(f'tool {tool.name} has no installed versions. Please run \'{install_cmd}\' to install it.')
msg = f'tool {tool.name} has no installed versions.'
if 'NIX_PATH' in os.environ:
fatal(f'{msg} The environment indicates that you might be using NixOS. '
'Please see https://nixos.wiki/wiki/ESP-IDF for how to install tools for it.')
else:
fatal(f'{msg} Please run \'{install_cmd}\' to install it.')
if tool.version_in_path and tool.version_in_path not in tool.versions:
info(f'An unsupported version of tool {tool_name} was found in PATH: {tool.version_in_path}. ' +
prefer_system_hint, f=sys.stderr)
Expand Down

0 comments on commit ba60c2d

Please # to comment.