Hello,
I am trying to cross-compile some package in my nix flake via an overlay, here is the derivation:
It is used in this output in my flake:
And the build fails with:
% nix build '.#serialosc_docker_rpi'
error: builder for '/nix/store/drsqbhnwaiqrf9vdgg1939phplbikdbd-serialosc-armv6l-unknown-linux-gnueabihf-1.4.3.drv' failed with exit code 2;
last 10 log lines:
> --enable-system-libuv
> use libuv
> provided by
> the system
> instead of
> the
> included
> git
> submodule.
> waf: error: no such option: --cross-compile
For full logs, run 'nix log /nix/store/drsqbhnwaiqrf9vdgg1939phplbikdbd-serialosc-armv6l-unknown-linux-gnueabihf-1.4.3.drv'.
error: 1 dependencies of derivation '/nix/store/d276c73zcz3m1zrwbv6vj64yl2pn5gh2-serialosc-customisation-layer.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rpniidmi0rjrl1820lrk8d6z27d4ks7y-serialosc-conf.json.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0a74r99igrw7xpbcsf0wxc8f9p8wmcva-stream-serialosc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9mlbd3946kb3n1ld9hy7yydh3q6gnk8p-serialosc.tar.gz.drv' failed to build
%
And I fail to understand how dontAddWafCrossFlags
is not expanded in wafHook.
I failed to reproduce the issue both from a vanilla flake and using flake-parts, using both nixpkgs-22.11 and my nixpkgs fork from last year that has some Python-related cross-compilation fixes (see previous discussion).
My attempt to reproduce this issue is in GitHub - lopter/badwaf: Support code to try to reproduce some nix build issue. It has two branches, one using vanilla flake and one using flake-parts.
What is going on? How does one go about debugging it?