What to do if the package needs rust nightly

I want to add rawst in nixpkgs, the README says:

rust nightly is required

And compilation, if done as usual, leads to an error.

You can not package contribute it to nixpkgs, there will never be a nightly rust compiler.

But feel free to package it up for yourself using one of the rust overlays.

1 Like

That’s not necessarily correct. You can try to set env.RUSTC_BOOTSTRAP = 1; in the derivation; that may work if it’s a feature that stable rustc knows about.

Though this is a hack as it’s circumventing some rust behaviors, it’s a hack that many packages in nixpkgs already use.

This is also mentioned in the nixpkgs manual:

2 Likes