This is not easy to do right now. Someone had a PR to make this easier here:
https://github.com/NixOS/nixpkgs/pull/51626
But it hasn’t been reviewed, and I’m a little bit hesitant to merge it as is. If anyone can review that, it would make this process much easier! We could add it as a job for cross-trunk, and you would just download it from:
https://hydra.nixos.org/jobset/nixpkgs/cross-trunk#tabs-jobs
Unfortunately Nix is broken right now in cross-trunk:
https://hydra.nixos.org/job/nixpkgs/cross-trunk/rpi.nix.x86_64-linux
Any fixes for that would be greatly appreciated!