`cargo cbuild` needs to have the `C{C,XX}_FOR_{${platform}}`
variables set just like `cargo` since it is basically a wrapper
around cargo. Without these variables, it will try to use the
`hostPlatform` C compiler to compile `build.rs` scripts, and will
pass flags to that compiler which only make sense on the
`buildPlatform`. So it's just doomed without the environment
variables.
Right now it looks like `rav1e` is the only package we have that is
using `cargo-c`, but if that changes in the future we should factor
this out as its own hook, like `maturinBuildHook` and the others.
These packages were identified as broken when ffmpeg = ffmpeg_5.
Tested _only_ by building them. If you are a maintainer of one of these
packages, please test whether your package still works.
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
This is a native build input because it's used at build time by the
"built" crate, which tries to embed git info and build timestamps into
the binary (ugh).
This fixes cross-compilation from x86_64 to aarch64, because git2's
build.rs tries to use -m64, which is x86_64-only.
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken
Tool is still WIP but this is one of the first results.
I manually audited the results and removed some results that were not valid.
Note that some of these packages maybe should have more constrained platforms set
instead of broken set, but I think not being perfectly correct is better than
just keep trying to build all these things and never succeeding.
Some observations:
- Some darwin builds require XCode tools
- aarch64-linux builds sometimes suffer from using gcc9
- gcc9 is getting older and misses some new libraries/features
- Sometimes tools try to do system detection or expect some explicit settings for
platforms that are not x86_64-linux
In addition to wtwitch, we have also setup the manpage, bash and zsh
completion, and set a default LANG value, since this is needed, but not
guaranteed on systems like darwin.
Fixes#184685
Network tests succeed outside of sandbox, as they call 'localhost'.
Disable to allow building in sandbox.
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Use buildPhase to make clear that we need two invocations of 'make' with
different targets.
Also set IS_RELEASE to 1 to ensure an optimized build is created instead
of a debug build (see Makefile).