about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix
blob: 1e4432ecc6422a9f7e72cd870b0d4113d2644e5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib
, sgx-azure-dcap-client
, gtest
, makeWrapper
}:
sgx-azure-dcap-client.overrideAttrs (old: {
  nativeBuildInputs = old.nativeBuildInputs ++ [
    makeWrapper
    gtest
  ];

  patches = [
    ./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 ]}"
  '';
})