Commit 4e937f0d authored by Vincent Haupert's avatar Vincent Haupert
Browse files

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

parent da0dc833
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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";
+27 −0
Original line number Diff line number Diff line
{ 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 ]}"
  '';
})