3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/stdenv
John Ericson c26252af3e lib, stdenv: Check meta.platforms against host platform and be open world
First, we need check against the host platform, not the build platform.
That's simple enough.

Second, we move away from exahustive finite case analysis (i.e.
exhaustively listing all platforms the package builds on). That only
work in a closed-world setting, where we know all platforms we might
build one. But with cross compilation, we may be building for arbitrary
platforms, So we need fancier filters. This is the closed world to open
world change.

The solution is instead of having a list of systems (strings in the form
"foo-bar"), we have a list of of systems or "patterns", i.e. attributes
that partially match the output of the parsers in `lib.systems.parse`.
The "check meta" logic treats the systems strings as an exact whitelist
just as before, but treats the patterns as a fuzzy whitelist,
intersecting the actual `hostPlatform` with the pattern and then
checking for equality. (This is done using `matchAttrs`).

The default convenience lists for `meta.platforms` are now changed to be
lists of patterns (usually a single pattern) in
`lib/systems/for-meta.nix` for maximum flexibility under this new
system.

Fixes #30902
2018-03-15 00:44:34 -04:00
..
cross prebuilt android tools: Init using SDK 2018-02-27 14:15:39 -05:00
custom top-level: {build,host,target}Platform are defined in the stdenv instead 2017-07-07 12:55:02 -04:00
cygwin cygwin: rebase fixes 2017-06-26 09:26:10 -03:00
darwin fetchurl: cleanup, better errors 2018-02-18 14:24:53 +00:00
freebsd fetchurl: cleanup, better errors 2018-02-18 14:24:53 +00:00
generic lib, stdenv: Check meta.platforms against host platform and be open world 2018-03-15 00:44:34 -04:00
linux Merge pull request #35247 from telent/mips32 2018-02-27 14:01:15 -05:00
native fetchurl: cleanup, better errors 2018-02-18 14:24:53 +00:00
nix cc-wrapper: Use stdenvNoCC to build 2017-09-26 14:08:21 -04:00
adapters.nix lib, treewide: Add missing MIPS arches, and fix existing usage 2018-02-23 20:43:42 -05:00
booter.nix treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly 2017-11-05 17:10:53 -05:00
common-path.nix
default.nix lib, treewide: Add missing MIPS arches, and fix existing usage 2018-02-23 20:43:42 -05:00