lol

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

+32
+5
pkgs/os-specific/linux/sgx/azure-dcap-client/default.nix
··· 7 7 , openssl 8 8 , pkg-config 9 9 , linkFarmFromDrvs 10 + , callPackage 10 11 }: 11 12 12 13 let ··· 77 78 "-C src/Linux" 78 79 "prefix=$(out)" 79 80 ]; 81 + 82 + # Online test suite; run with 83 + # $(nix-build -A sgx-azure-dcap-client.tests.suite)/bin/tests 84 + passthru.tests.suite = callPackage ./test-suite.nix { }; 80 85 81 86 meta = with lib; { 82 87 description = "Interfaces between SGX SDKs and the Azure Attestation SGX Certification Cache";
+27
pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix
··· 1 + { lib 2 + , sgx-azure-dcap-client 3 + , gtest 4 + , makeWrapper 5 + }: 6 + sgx-azure-dcap-client.overrideAttrs (oldAttrs: { 7 + nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ 8 + makeWrapper 9 + gtest 10 + ]; 11 + 12 + buildFlags = [ 13 + "tests" 14 + ]; 15 + 16 + installPhase = '' 17 + runHook preInstall 18 + 19 + install -D ./src/Linux/tests "$out/bin/tests" 20 + 21 + runHook postInstall 22 + ''; 23 + 24 + postFixup = '' 25 + wrapProgram "$out/bin/tests" --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-azure-dcap-client ]}" 26 + ''; 27 + })