We've been doing some BSD cross work with Nixpkgs. A hope is that if we can extend that to NixOS too, and then it should be quite easy to checkpoint and share work like this for anyone to reproduce and pick up the baton on.
Can you share any more information about the BSD cross work with Nixpkgs?
For using it, you can try
nix-build 'channel:nixpkgs-unstable' -A pkgsCross.x86_64-netbsd.libcpuid
nix-build 'channel:nixpkgs-unstable' -A pkgsCross.x86_64-freebsd.libcpuid
For the gory details, check out https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specifi... and https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specifi...