Cargo package help

I am trying to build and run a tex engine written in rust and to use it in nixos, but i am getting errors, I didnot write any derivation for it just building using cargo. The link to the package is rustex. I want to build the rustex and use it with my nixos any help will be appreciated. maybe writing a derivation instead of using cargo would help ? I am not sure. guidance please.

Use nix-init then look at Packaging existing software with Nix — nix.dev documentation.