This continues where d8f7f6a5ce left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.
Also, similarly to d8f7f6a5ce some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
librdimon.a is only available on ARM architectures, therefore building
newlib-nano for other architectures (e.g. RISC-V) fails presently.
This commit fixes this issue by only copying the library files that
actually exist in the for loop body. Alternatively, it would be
theoretically feasible to change the libraries iterated over based
on the targeted architecture.
One of resholve's passthru tests depended on getting `script` from
util-linux, but it's no longer there on macos after #232713.
This change just tracks upstream change to use unixtools.script, which
is what I should have used in the first place. Upstream commit for
reference:
3407150949
apply patch from gentoo because there's no libstdc++.a libsupc++.a or
their nano versions
this matches upstream arm more
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
-lc_nano is used in nano.specs but 'libc_nano.a' is not installed without these 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
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure