nixpkgs/pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix
Sergei Trofimovich 9687bedc4c sgx-azure-dcap-client: fix gcc-13 build failure
Without the change build fails on `master` as
https://hydra.nixos.org/build/247706272:

    local_cache.cpp: In function 'void throw_if(bool, const std::string&)':
    local_cache.cpp:40:20: error: 'runtime_error' is not a member of 'std'
       40 |         throw std::runtime_error(error);
          |                    ^~~~~~~~~~~~~
    local_cache.cpp:17:1: note: 'std::runtime_error' is defined in header '<stdexcept>'; did you forget to '#include <stdexcept>'?
       16 | #include <sys/file.h>
      +++ |+#include <stdexcept>
       17 | #include <sys/stat.h>
2024-02-11 17:19:57 +00:00

33 lines
564 B
Nix

{ lib
, sgx-azure-dcap-client
, gtest
, makeWrapper
}:
sgx-azure-dcap-client.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
makeWrapper
gtest
];
patches = (old.patches or []) ++ [
./tests-missing-includes.patch
];
buildFlags = [
"tests"
];
installPhase = ''
runHook preInstall
install -D ./src/Linux/tests "$out/bin/tests"
runHook postInstall
'';
postFixup = ''
wrapProgram "$out/bin/tests" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-azure-dcap-client ]}"
'';
})