treewide: move NIX_CFLAGS_COMPILE to the env attrset #217206
treewide: move NIX_CFLAGS_COMPILE to the env attrset #217206lovesegfault merged 6 commits intoNixOS:masterfrom
Conversation
da3f2b3 to
9fd7fdd
Compare
2ea0c08 to
1997d46
Compare
d648301 to
c8cc1ba
Compare
c8cc1ba to
3dbd481
Compare
env values must be strings
env values must be strings
5c2c130 to
3251013
Compare
|
Looks like passing $ nix-build -A rPackages.data_table
error: cannot coerce a set to a string
at /.../nixpkgs/pkgs/development/r-modules/default.nix:978:7:
977| data_table = old.data_table.overrideDerivation (attrs: {
978| env.NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE + " -fopenmp";
| ^
979| patchPhase = "patchShebangs configure";
(use '--show-trace' to show detailed location information)Also for |
|
They should be changed to use overrideAttrs https://nixos.org/manual/nixpkgs/stable/#sec-pkg-overrideDerivation
i can do it, should be a simple replacement |
|
978| env.NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE + " -fopenmp";
| ^
Hm, why this «env.»? It is a plain top-level string in attrs, so it should be a plain top-level string in the output of your override function.
|
|
Aha! |
I take it this makes it impossible to use a list of strings for cflags? |
see commit messages |
|
rPackages emscriptenPackages fixes #217870 appears to be a problem in only those sets checked with |
|
with #217962 commits other than |
Description of changes
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
Previous unmerged structuredAttrs and env PRs have done the same thing #76732
other variables that will have to be transferred (in separate PRs)
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)