Motivation for this hook is simple: there's no single documented
way to do trivial things with ctest:
1. Pass additional flags to ctest invocation.
2. Selectively disable tests in a mechanism similar to python's
`disabledTests` or rust's composable skips in `checkFlags`.
3. Disable parallel checking.
Current state of things has lead to several different solutions:
1. Completely overriding `checkPhase` [1] and invoking ctest manually
with the necessary flags. This is most often coupled with `-E` for
disabling test or setting parallel level.
2. Wrangling with weird double string/regex escaping and trying to stuff
additional parameters and/or exclusion regex via `CMAKE_CTEST_ARGUMENTS`.
This approach is especially painful when test names have spaces. This is
the reason I originally decided to implement this hook after wrangling with
failing darwin tests here [2].
3. Stuffing additional arguments into `checkFlagsArray` with the
`ARGS` makefile parameter [3].
I don't see any reason to keep the status-quo. Doing something along these
lines has been suggested [4] for both `ctest` and `meson`. Meson setup-hook
has switched from `ninja` to `meson` in [5] with little friction. Doing
the same for cmake in a single sweep would prove problematic due to the
aforementioned zoo of workarounds and hacks for `ctest`. Doing it via
a separate hook would allow us to refactor things piecemeal and without
going through staging. The benefit of the hook is immediately clear and it
would allow to drive the refactor tractor at a comfortable pace.
[1]: pd/pdal/package.nix:117, cc/ccache/package.nix:108, gl/glog/package.nix:79
[2]: https://www.github.com/NixOS/nixpkgs/pull/375955
[3]: op/open62541/package.nix:114
[4]: https://www.github.com/NixOS/nixpkgs/issues/113829
[5]: https://www.github.com/NixOS/nixpkgs/pull/213845
Cargo 1.84.0 broke fetchCargoTarball hashes, so fetchCargoTarball is
not long for this world. Tell people to use fetchCargoVendor, which
Nixpkgs is currently in the process of switching to across the tree.
These flags are not part of waf, they're custom flags that are not
widely implemented. More packages are broken because of these flags
being added than actually recognise them.
Of the packages in Nixpkgs that directly depend on wafHook that we can
attempt to cross compile (i.e. all their dependencies cross compile),
5 already successfully cross compile and recognise these flags, 2
already successfully cross compile because they have been opted out of
these flags, 3 don't cross compile successfully for reasons unrelated
to these flags, and for the remaining 7, the only thing stopping them
cross compiling successfully is that they are being passed these flags
that they don't recognise.
All of the five successfully cross-compiling packages that do
recognise these flags are samba projects: ldb, talloc, tdb, tevent,
and samba4. So this isn't a general waf convention, just a samba one.
It therefore doesn't make sense to set these flags by default. They
should just be included in the expressions for each samba project,
like all the other quirks common to samba build systems.
This change fixes cross compilation of the following packages:
blockhash ganv ndn-cxx mda_lv2 pflask raul saldl
This upgrades the default version of zig to zig_0_12, which builds
reproducibly on darwin.
Fixes#299091.
Also upgrades all packages compatible with zig 0.12 to that version.
I tried to upgrade packages currently pinning 0.11 as well, but only a
few worked.
Co-authored-by: Weijia Wang (wegank) <contact@weijia.wang>