sgx-azure-quote-provider: add test-suite derivation

This commit is contained in:
Vincent Haupert 2022-11-29 15:19:01 +01:00
parent da0dc8339c
commit 4e937f0d6b
2 changed files with 32 additions and 0 deletions

View File

@ -7,6 +7,7 @@
, openssl
, pkg-config
, linkFarmFromDrvs
, callPackage
}:
let
@ -78,6 +79,10 @@ stdenv.mkDerivation rec {
"prefix=$(out)"
];
# Online test suite; run with
# $(nix-build -A sgx-azure-dcap-client.tests.suite)/bin/tests
passthru.tests.suite = callPackage ./test-suite.nix { };
meta = with lib; {
description = "Interfaces between SGX SDKs and the Azure Attestation SGX Certification Cache";
homepage = "https://github.com/microsoft/azure-dcap-client";

View File

@ -0,0 +1,27 @@
{ lib
, sgx-azure-dcap-client
, gtest
, makeWrapper
}:
sgx-azure-dcap-client.overrideAttrs (oldAttrs: {
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
makeWrapper
gtest
];
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 ]}"
'';
})