eww icon indicating copy to clipboard operation
eww copied to clipboard

Fix flake refactor ([#532])

Open PhilTaken opened this issue 2 years ago • 5 comments

Description

The exposed overlay did not work as a standalone, required final to be overlayed with rust-overlay prior. This was caused by the mkRustToolchain function and the way it was used in the overlay itself.

To solve this, I extended the passed pkgs set with the rust-overlay overlay first, to gain access to the rust-bin set from arbitrary pkgs passed into the mkRustToolchain function.

Additional Notes

I also added some tests that depend on the packages definition, which only uses the overlay exposed by self, which in turn defines the build process for any pkgs passed in.

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • [ ] All widgets I've added are correctly documented.
  • [ ] I added my changes to CHANGELOG.md, if appropriate.
  • [ ] The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • [ ] I used cargo fmt to automatically format all code before committing

PhilTaken avatar Sep 08 '22 10:09 PhilTaken

@fortuneteller2k Did you check if the overlay works?

PhilTaken avatar Sep 08 '22 10:09 PhilTaken

its intentional for users to import their own rust-overlay, it allows people to keep up with rust-toolchain.toml changes when the lockfile isnt updated

moni-dz avatar Sep 08 '22 10:09 moni-dz

its intentional for users to import their own rust-overlay, it allows people to keep up with rust-toolchain.toml changes when the lockfile isnt updated

that seems very counter-intuitive, the end-user should not have to deal with that. lockfile changes should be dealt with on the repository side, immediately

as a nix user, when I use an overlay I expect it to work without requiring any further action on my side

PhilTaken avatar Sep 08 '22 10:09 PhilTaken

@fortuneteller2k if need be the version of rust-overlay can still be overriden via inputs.nix-overlay.follows

PhilTaken avatar Sep 08 '22 11:09 PhilTaken

@elkowar is there anything blocking a merge?

PhilTaken avatar Nov 09 '22 08:11 PhilTaken