stdenv: fix withCFlags when NIX_CFLAGS_COMPILE exists outside of env#438709
stdenv: fix withCFlags when NIX_CFLAGS_COMPILE exists outside of env#438709SuperSandro2000 wants to merge 1 commit intoNixOS:masterfrom
Conversation
error: The `env` attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: - NIX_CFLAGS_COMPILE: in `env`: " -O2 -pipe"; in derivation arguments: null
philiptaron
left a comment
There was a problem hiding this comment.
From the PR headmatter:
But now it fails in php
This giant callstack makes me believe this PR isn't suitable for merging yet. I'd like to merge something that fixes an entire problem, rather than moving the symptom from one location to another.
This appears to be a __structuredAttrs-related issue. Is that right?
It also undoes the last change to the helper by @Artturin in #225929. Let's direct our attention to making the location of NIX_CFLAGS_COMPILE canonical throughout nixpkgs, or having a more compelling reason for the code in this PR other than a symptom shifting from one location to another.
| NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or "") + " ${toString compilerFlags}"; | ||
| }; | ||
| }); | ||
| mkDerivationFromStdenv = extendMkDerivationArgs old ( |
|
See also the closed PR #393458 which attempted much the same thing. |
|
That is the full trace I got first: Nix Stack Trace
|
|
I fixed some of the NIX_CFLAGS_COMPILE in #439203 but now I run also in the same infinite recursion with php: Nix Stack Trace
|
But now it fails in php
Nix Stack Trace
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.