-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
0.kind: bugSomething is brokenSomething is broken1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.
Description
Describe the bug
The cmakeFlags array cannot parse spaces correctly, and thinks any argument after a space is a another CMake flag. I think it splits the flag on spaces upon parsing it. The flags do get printed out correctly, however they are not handled the same way.
I've tried using all kinds of different quotes, and escaping almost every single character, but nothing seemed to work.
To Reproduce
Steps to reproduce the behavior:
- Append an space to a CMake flag. (
cmakeFlags = [ "-DFoo=\"foo bar\"" ];) - Watch the
cmakeConfigurePhasefail, as it thinksbaris an seperate flag, and it cannot find this local file.
CMake Error: The source directory "/build/source/build/bar"" does not exist.
Expected behavior
cmakeFlags should be correctly passed to CMake, and the build should succeed.
Additional context
Note that when manually setting cmakeFlagsArray, this does work.
preConfigure = ''
cmakeFlagsArray=(
$cmakeFlagsArray
"-DFoo=\"foo bar\""
)
'';When applying this flag from a nix-shell, it also succesfully parses it.
Notify maintainers
@ttuegel @LnL7
Metadata
- system:
"x86_64-linux" - host os:
Linux 5.11.0, NixOS, 21.05pre271444.9816b99e71c (Okapi) - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.3.10 - channels(root):
"nixos-21.05pre271444.9816b99e71c" - channels(ivv):
"home-manager, nixpkgs-21.05pre271900.11cd34cd592" - nixpkgs:
/home/ivv/.nix-defexpr/channels/nixpkgs
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: cmake
attribute: yuzu-{mainline,ea}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.