Skip to content

Commit

Permalink
Add path for OPENOCD_SCRIPTS export var in esp-idf tools.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cyber-murmel committed Mar 20, 2024
1 parent e12a865 commit 0dcc1d4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
13 changes: 13 additions & 0 deletions pkgs/esp-idf/0001-tools.json.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/tools/tools.json b/tools/tools.json
index d51e590250..7fe889aca9 100644
--- a/tools/tools.json
+++ b/tools/tools.json
@@ -716,7 +716,7 @@
]
],
"export_vars": {
- "OPENOCD_SCRIPTS": "${TOOL_PATH}/openocd-esp32/share/openocd/scripts"
+ "OPENOCD_SCRIPTS": "${TOOL_PATH}/share/openocd/scripts"
},
"info_url": "https://github.com/espressif/openocd-esp32",
"install": "always",
27 changes: 20 additions & 7 deletions pkgs/esp-idf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,26 @@
}:

let
src = fetchFromGitHub {
owner = "espressif";
repo = "esp-idf";
rev = rev;
sha256 = sha256;
fetchSubmodules = true;
};
src =
stdenv.mkDerivation {
name = "esp-idf";
version = rev;
src = fetchFromGitHub {
owner = "espressif";
repo = "esp-idf";
rev = rev;
sha256 = sha256;
fetchSubmodules = true;
};
patches = [ ./0001-tools.json.patch ];

phases = [ "unpackPhase" "patchPhase" "installPhase" ];

installPhase = ''
cp -r . $out
'';

};

allTools = callPackage (import ./tools.nix) {
toolSpecList = (builtins.fromJSON (builtins.readFile "${src}/tools/tools.json")).tools;
Expand Down

0 comments on commit 0dcc1d4

Please sign in to comment.