Files
nixpkgs/pkgs/development/python-modules/esp-idf-size/1.x-compat.patch
T
Martin Weinelt a939166cdf python3Packages.esp-idf-size: add 1.x argparse compat
Depending on the esp-idf version 1.x or 2.x can be required. The
difference is that 1.x provides the --ng flag, which 2.x does not.

The --ng behavior is the default in 2.x, so adding the flag as a stub
so the argparser does not complain is a cheap escape hatch to support
both.
2025-11-13 01:40:14 +01:00

14 lines
633 B
Diff

diff --git a/esp_idf_size/main.py b/esp_idf_size/main.py
index a600b90..cfe3618 100644
--- a/esp_idf_size/main.py
+++ b/esp_idf_size/main.py
@@ -45,6 +45,8 @@ def main() -> None:
parser = argparse.ArgumentParser(prog='esp_idf_size',
description='This tool displays firmware size information for project built by ESP-IDF')
+ parser.add_argument('--ng', action='store_true', help="stub for 1.x compat")
+
parser.add_argument('input_file',
metavar='MAP_FILE',
help='Path to the link map file generated by the ESP-IDF build system.')