teepot/packages/teepot/default.nix
Harald Hoyer 83d57bf354
chore: update Rust toolchain to version 1.83
- Upgraded the Rust version in rust-toolchain.toml to 1.83.
- Ensures compatibility and access to the latest features and fixes.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-12-20 09:29:43 +01:00

45 lines
1.2 KiB
Nix

# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs
{ teepotCrate }: teepotCrate.craneLib.buildPackage (
teepotCrate.commonArgs // {
pname = "teepot";
inherit (teepotCrate) cargoArtifacts;
passthru = {
inherit (teepotCrate) rustPlatform
rustVersion
commonArgs
craneLib
cargoArtifacts;
};
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"
"verify_era_proof_attestation"
];
postInstall = ''
removeReferencesToVendoredSources "$out" "$cargoVendorDir"
removeReferencesToVendoredSources "$out" "${teepotCrate.rustVersion}/lib/rustlib/"
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
'';
}
)