From a0a0c93d0dbd62f799a58f0f75f6f4adbf270ef8 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 21 Nov 2024 17:14:01 +0100 Subject: [PATCH] build(nix): backport fix for arm-none-eabi-gdb --- shell.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 7a7cb0b059..c9478c8e74 100644 --- a/shell.nix +++ b/shell.nix @@ -80,6 +80,20 @@ let version = "stm-cubeide-v1.13.0"; nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ newNixpkgs.autoreconfHook ]; })); + # backport https://github.com/NixOS/nixpkgs/pull/229537 + # remove after nixpkgs bump + gcc-arm-embedded-gdbfix = (nixpkgs.gcc-arm-embedded.overrideAttrs (oldAttrs: { + postFixup = '' + mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped + cat < $out/bin/arm-none-eabi-gdb + #!${nixpkgs.runtimeShell} + export PYTHONPATH=${nixpkgs.python38}/lib/python3.8 + export PYTHONHOME=${nixpkgs.python38}/bin/python3.8 + exec $out/bin/arm-none-eabi-gdb-unwrapped "\$@" + EOF + chmod +x $out/bin/arm-none-eabi-gdb + ''; + })); llvmPackages = nixpkgs.llvmPackages_14; # see pyright/README.md for update procedure pyright = nixpkgs.callPackage ./ci/pyright {}; @@ -107,7 +121,7 @@ stdenvNoCC.mkDerivation ({ crowdin-cli # for translations curl # for connect tests editorconfig-checker - gcc-arm-embedded + (if devTools then gcc-arm-embedded-gdbfix else gcc-arm-embedded) git gitAndTools.git-subrepo gnumake