mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
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:
@@ -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"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user