diff --git a/overlay.nix b/overlay.nix index c6fff9c..d90f6ea 100644 --- 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: {