From a3b69162e9eab04801d428a0b306b9f98f00d01e Mon Sep 17 00:00:00 2001 From: Vincent Haupert Date: Mon, 15 Nov 2021 03:00:27 +0100 Subject: [PATCH] sgx-sdk: fix sgx-gdb --- pkgs/os-specific/linux/sgx-sdk/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/sgx-sdk/default.nix b/pkgs/os-specific/linux/sgx-sdk/default.nix index 013d7b06eb68..dcbbb115b9c8 100644 --- a/pkgs/os-specific/linux/sgx-sdk/default.nix +++ b/pkgs/os-specific/linux/sgx-sdk/default.nix @@ -7,6 +7,7 @@ , binutils , cmake , file +, gdb , git , libtool , nasm @@ -132,8 +133,13 @@ stdenv.mkDerivation rec { ''; preFixup = '' + sgxsdk="$out/sgxsdk" + 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;