mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
gcc-arm-embedded: fix arm-none-eabi-gdb error
This commit is contained in:
parent
4116178905
commit
7fae5a802b
@ -3,6 +3,8 @@
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python38
|
||||
, libxcrypt-legacy
|
||||
, runtimeShell
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -38,10 +40,21 @@ stdenv.mkDerivation rec {
|
||||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
|
||||
cat <<EOF > $out/bin/arm-none-eabi-gdb
|
||||
#!${runtimeShell}
|
||||
export PYTHONPATH=${python38}/lib/python3.8
|
||||
export PYTHONHOME=${python38}/bin/python3.8
|
||||
$out/bin/arm-none-eabi-gdb-unwrapped
|
||||
EOF
|
||||
chmod +x $out/bin/arm-none-eabi-gdb
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
|
@ -3,6 +3,8 @@
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python38
|
||||
, libxcrypt-legacy
|
||||
, runtimeShell
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -40,10 +42,21 @@ stdenv.mkDerivation rec {
|
||||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python38 libxcrypt-legacy ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
mv $out/bin/arm-none-eabi-gdb $out/bin/arm-none-eabi-gdb-unwrapped
|
||||
cat <<EOF > $out/bin/arm-none-eabi-gdb
|
||||
#!${runtimeShell}
|
||||
export PYTHONPATH=${python38}/lib/python3.8
|
||||
export PYTHONHOME=${python38}/bin/python3.8
|
||||
$out/bin/arm-none-eabi-gdb-unwrapped
|
||||
EOF
|
||||
chmod +x $out/bin/arm-none-eabi-gdb
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
|
Loading…
Reference in New Issue
Block a user