diff --git a/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix b/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix index cd3d2f94d6f3..0ee191e86895 100644 --- a/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix +++ b/pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchFromGitHub +, fetchpatch , lib , curl , nlohmann_json @@ -43,6 +44,16 @@ stdenv.mkDerivation rec { hash = "sha256-q0dI4WdA1ue4sw+QfSherh31Ldf9gnhoft66o3E9gnU="; }; + patches = [ + # Fix gcc-13 build: + # https://github.com/microsoft/Azure-DCAP-Client/pull/197 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/microsoft/Azure-DCAP-Client/commit/fbcae7b3c8f1155998248cf5b5f4c1df979483f5.patch"; + hash = "sha256-ezEuQql3stn58N1ZPKMlhPpUOBkDpCcENpGwFAmWtHc="; + }) + ]; + nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix b/pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix index 1e4432ecc642..40d80ece8abf 100644 --- a/pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix +++ b/pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix @@ -9,7 +9,7 @@ sgx-azure-dcap-client.overrideAttrs (old: { gtest ]; - patches = [ + patches = (old.patches or []) ++ [ ./tests-missing-includes.patch ];