mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-22 15:34:48 +02:00
Merge pull request #303 from matter-labs/ld_library_path
refactor(shells): simplify environment variable declarations
This commit is contained in:
commit
b8398ad15f
1 changed files with 16 additions and 24 deletions
|
@ -42,31 +42,23 @@ mkShell {
|
||||||
google-cloud-sdk
|
google-cloud-sdk
|
||||||
];
|
];
|
||||||
|
|
||||||
TEE_LD_LIBRARY_PATH = lib.makeLibraryPath (
|
env = {
|
||||||
lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [
|
QCNL_CONF_PATH =
|
||||||
pkgs.curl
|
if (stdenv.hostPlatform.system != "x86_64-linux") then
|
||||||
nixsgx.sgx-dcap
|
""
|
||||||
nixsgx.sgx-dcap.quote_verify
|
else
|
||||||
nixsgx.sgx-dcap.default_qpl
|
"${nixsgx.sgx-dcap.default_qpl}/etc/sgx_default_qcnl.conf";
|
||||||
]
|
OPENSSL_NO_VENDOR = "1";
|
||||||
);
|
RUST_SRC_PATH = "${toolchain_with_src}/lib/rustlib/src/rust/";
|
||||||
|
};
|
||||||
QCNL_CONF_PATH =
|
|
||||||
if (stdenv.hostPlatform.system != "x86_64-linux") then
|
|
||||||
""
|
|
||||||
else
|
|
||||||
"${nixsgx.sgx-dcap.default_qpl}/etc/sgx_default_qcnl.conf";
|
|
||||||
OPENSSL_NO_VENDOR = "1";
|
|
||||||
RUST_SRC_PATH = "${toolchain_with_src}/lib/rustlib/src/rust/library";
|
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
if [ "x$NIX_LD" = "x" ]; then
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
|
||||||
export NIX_LD=$(<${stdenv.cc}/nix-support/dynamic-linker)
|
pkgs.lib.makeLibraryPath (lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [
|
||||||
fi
|
pkgs.curl
|
||||||
if [ "x$NIX_LD_LIBRARY_PATH" = "x" ]; then
|
nixsgx.sgx-dcap
|
||||||
export NIX_LD_LIBRARY_PATH="$TEE_LD_LIBRARY_PATH"
|
nixsgx.sgx-dcap.quote_verify
|
||||||
else
|
nixsgx.sgx-dcap.default_qpl
|
||||||
export NIX_LD_LIBRARY_PATH="$NIX_LD_LIBRARY_PATH:$TEE_LD_LIBRARY_PATH"
|
])}"
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue