Update pkg setup

This commit is contained in:
2026-05-19 15:34:30 +00:00
parent 4f8b599665
commit 04e0913d03
5 changed files with 130 additions and 181 deletions

View File

@@ -0,0 +1,16 @@
# Setup hook for bisheng-wrapper (source when package is in buildInputs).
# Use alone when ASCEND_TOOLKIT_HOME already points at a CANN install (Nix or not).
addToSearchPath PATH "@WRAPPER_OUT@/bin"
if [ -n "${ASCEND_TOOLKIT_HOME:-}" ]; then
_ascend_arch_linux="$(uname -m)-linux"
export BISHENG_REAL="${ASCEND_TOOLKIT_HOME}/${_ascend_arch_linux}/ccec_compiler/bin/bisheng"
fi
export CMAKE_C_COMPILER="@WRAPPER_OUT@/bin/bisheng"
export CMAKE_CXX_COMPILER="@WRAPPER_OUT@/bin/bisheng"
if [ -f "@WRAPPER_OUT@/nix-support/bisheng-nix-cflags" ]; then
export NIX_CFLAGS_COMPILE_bisheng="$(cat "@WRAPPER_OUT@/nix-support/bisheng-nix-cflags")"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE_bisheng"
fi