chipsec: pass --build-libs without relying on bash eval of setupPyBuildFlags

We'd like to remove bash eval for setupByBuildFlags, thus use
appendToVar in the hook instead.

Tested that linuxPackages.chipsec still builds, including the driver in
the right place.
This commit is contained in:
Wolfgang Walther
2024-10-30 20:37:17 +01:00
parent 9d10d593cf
commit 729a3efc56

View File

@@ -44,6 +44,7 @@ python3.pkgs.buildPythonApplication rec {
preBuild = lib.optionalString withDriver ''
export CHIPSEC_BUILD_LIB=$(mktemp -d)
mkdir -p $CHIPSEC_BUILD_LIB/chipsec/helper/linux
appendToVar setupPyBuildFlags "--build-lib=$CHIPSEC_BUILD_LIB"
'';
env.NIX_CFLAGS_COMPILE = toString [
@@ -57,9 +58,7 @@ python3.pkgs.buildPythonApplication rec {
$out/${python3.pkgs.python.sitePackages}/drivers/linux/chipsec.ko
'';
setupPyBuildFlags = [
"--build-lib=$CHIPSEC_BUILD_LIB"
] ++ lib.optionals (!withDriver) [
setupPyBuildFlags = lib.optionals (!withDriver) [
"--skip-driver"
];