mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-22 15:34:48 +02:00

It refactors the way the SGX containers are built. This removes all `Dockerfile` and gramine manifest files. It also enables a single recipe for azure and non-azure variants. Additionally the `teepot-crate.nix` is now the inherited recipe to build the rust `teepot` crate. Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (c) 2024 Matter Labs
|
|
{ teepotCrate }: teepotCrate.craneLib.buildPackage (
|
|
teepotCrate.commonArgs // {
|
|
pname = "teepot";
|
|
inherit (teepotCrate) cargoArtifacts
|
|
NIX_OUTPATH_USED_AS_RANDOM_SEED;
|
|
|
|
|
|
passthru = {
|
|
inherit (teepotCrate) rustPlatform
|
|
rustVersion
|
|
commonArgs
|
|
craneLib
|
|
cargoArtifacts;
|
|
NIX_OUTPATH_USED_AS_RANDOM_SEED = "aaaaaaaaaa";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"tee_key_preexec"
|
|
"tee_ratls_preexec"
|
|
"tee_self_attestation_test"
|
|
"tee_stress_client"
|
|
"tee_vault_admin"
|
|
"tee_vault_unseal"
|
|
"teepot_read"
|
|
"teepot_write"
|
|
"vault_admin"
|
|
"vault_unseal"
|
|
"verify_attestation"
|
|
];
|
|
postInstall = ''
|
|
removeReferencesToVendoredSources "$out" "$cargoVendorDir"
|
|
mkdir -p $out/nix-support
|
|
for i in $outputs; do
|
|
[[ $i == "out" ]] && continue
|
|
mkdir -p "''${!i}/bin"
|
|
echo "''${!i}" >> $out/nix-support/propagated-user-env-packages
|
|
binname=''${i//_/-}
|
|
mv "$out/bin/$binname" "''${!i}/bin/"
|
|
done
|
|
'';
|
|
}
|
|
)
|
|
|