sgx-sdk: fix sgx-gdb

This commit is contained in:
Vincent Haupert 2021-11-15 03:00:27 +01:00
parent 141e8153fb
commit a3b69162e9

View file

@ -7,6 +7,7 @@
, binutils , binutils
, cmake , cmake
, file , file
, gdb
, git , git
, libtool , libtool
, nasm , nasm
@ -132,8 +133,13 @@ stdenv.mkDerivation rec {
''; '';
preFixup = '' preFixup = ''
sgxsdk="$out/sgxsdk"
echo "Fixing pkg-config files" echo "Fixing pkg-config files"
sed -i "s|prefix=.*|prefix=$out/sgxsdk|g" $out/sgxsdk/pkgconfig/*.pc sed -i "s|prefix=.*|prefix=$sgxsdk|g" $out/sgxsdk/pkgconfig/*.pc
echo "Patching GDB path in bin/sgx-gdb"
substituteInPlace "$sgxsdk/bin/sgx-gdb" --replace '/usr/local/bin/gdb' '${gdb}/bin/gdb'
''; '';
doInstallCheck = true; doInstallCheck = true;