feat: compat code for non x86_64-linux

- 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>
This commit is contained in:
Harald Hoyer 2025-03-20 10:25:24 +01:00
parent ed808efd03
commit eb39705ff1
Signed by: harald
GPG key ID: F519A1143B3FBE32
41 changed files with 1531 additions and 519 deletions

View file

@ -2,12 +2,14 @@
# Copyright (c) 2024 Matter Labs
{ lib
, inputs
, stdenv
, makeRustPlatform
, nixsgx
, nixsgx ? null
, pkg-config
, rust-bin
, pkgs
, openssl
, darwin
}:
let
rustVersion = rust-bin.fromRustupToolchainFile (inputs.src + "/rust-toolchain.toml");
@ -23,11 +25,15 @@ let
];
buildInputs = [
openssl
openssl.dev
]
++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [
nixsgx.sgx-sdk
nixsgx.sgx-dcap
nixsgx.sgx-dcap.quote_verify
nixsgx.sgx-dcap.libtdx_attest
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
strictDeps = true;