I could not get cross compiling to work on macOS. See this issue
{pkgs ? import <nixpkgs> {}}: let
cargo2nix = builtins.getFlake "github:cargo2nix/cargo2nix/release-0.11.0";
pkgsCross = import pkgs.path {
crossSystem = {
config = "x86_64-unknown-linux-musl";