cmake: the setup hook breaks with __structuredAttrs = true
#289037
Labels
0.kind: bug
Something is broken
significant
Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.
Describe the bug
The cmake setup hook breaks with
__structuredAttrs = true
.Steps To Reproduce
Write a derivation that uses
cmake
with__structuredAttrs = true
and setcmakeFlags
to a list with >1 element.The build hook always treats
$cmakeFlags
as a normal variable, so it uses only the first array element.Expected behavior
The flags get passed to cmake
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Solution used in the npm hook:
nixpkgs/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh
Lines 17 to 26 in 0855890
Workaround: use
cmakeFlagsArray
instead.Notify maintainers
@teto @ttuegel @LnL7 @AndersonTorres
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: