mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 15:13:56 +02:00

- do not build packages, which require `x86_64-linux` - use Phala `dcap-qvl` crate for remote attestation, if possible - nix: exclude `nixsgx` on non `x86_64-linux` platforms Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
47 lines
1,014 B
Nix
47 lines
1,014 B
Nix
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (c) 2024 Matter Labs
|
|
{ dockerTools
|
|
, buildEnv
|
|
, teepot
|
|
, stdenv
|
|
, openssl
|
|
, curl
|
|
, nixsgx
|
|
, pkg-config
|
|
}:
|
|
if (stdenv.hostPlatform.isDarwin) then {
|
|
# FIXME: dockerTools.buildLayeredImage seems to be broken on Darwin
|
|
} else
|
|
dockerTools.buildLayeredImage {
|
|
name = "verify-era-proof-attestation";
|
|
|
|
config.Entrypoint = [
|
|
"${teepot.teepot.verify_era_proof_attestation}/bin/verify-era-proof-attestation"
|
|
];
|
|
config.Env = [ "LD_LIBRARY_PATH=/lib" ];
|
|
contents = buildEnv {
|
|
name = "image-root";
|
|
|
|
paths =
|
|
with dockerTools;
|
|
with nixsgx;
|
|
[
|
|
pkg-config
|
|
openssl.out
|
|
curl.out
|
|
sgx-dcap.quote_verify
|
|
sgx-dcap.default_qpl
|
|
teepot.teepot.verify_era_proof_attestation
|
|
usrBinEnv
|
|
binSh
|
|
caCertificates
|
|
fakeNss
|
|
];
|
|
pathsToLink = [
|
|
"/bin"
|
|
"/lib"
|
|
"/etc"
|
|
"/share"
|
|
];
|
|
};
|
|
}
|