commit c697be8c28e9325ebfec05558bbc2f18520c8e59 parent 202a37221a63339d229199a8986863e7b3b82bdf Author: Daniel Barlow <dan@telent.net> Date: Fri, 8 Mar 2024 22:36:42 +0000 temporary fix for cmake cross-compilation Diffstat:
| M | overlay.nix | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/overlay.nix b/overlay.nix @@ -77,6 +77,22 @@ extraPkgs // { }; + # luarocks wants a cross-compiled cmake (which seems like a bug, + # we're never going to run luarocks on the device, but ...) + # but https://github.com/NixOS/nixpkgs/issues/284734 + # so we do surgery on the cmake derivation until that's fixed + + cmake = prev.cmake.overrideAttrs(o: + # don't override the build cmake or we'll have to rebuild + # half the known universe to no useful benefit + if final.stdenv.buildPlatform != final.stdenv.hostPlatform + then { + preConfigure = + builtins.replaceStrings + ["$configureFlags"] ["$configureFlags $cmakeFlags"] o.preConfigure; + } + else {} + ); dnsmasq = let d = prev.dnsmasq.overrideAttrs(o: {