diff --git a/flake.nix b/flake.nix index 1f5559eae..469156590 100644 --- a/flake.nix +++ b/flake.nix @@ -72,12 +72,14 @@ nixpkgs.overlays = [ (import "${mobile-nixos}/overlay/overlay.nix") uninsane.overlay - ] ++ (builtins.attrValues self.overlays) - ++ [ (next: prev: { + # for local != target we by default just emulate the target while building. + # provide a `pkgs.cross.` alias that consumers can use instead of `pkgs.` + # to explicitly opt into non-emulated cross compilation for any specific package. + # this is most beneficial for large packages with few pre-requisites -- like Linux. cross = next.crossFrom."${local}"; }) - ]; + ] ++ (builtins.attrValues self.overlays); } ]; });