Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General exporter and builderConstructor improvements #43

Merged
merged 4 commits into from
Apr 25, 2021

Conversation

Pacman99
Copy link
Collaborator

This is some fixups and improvments to the api for the overlaysFromChannelsExporter and packagesFromOverlaysBuilderConstructor.

Have overlays exporter take self.pkgs and inputs. The former is so nixpkgs sets are instantiated and the overlay lists are ready. The latter is to auto filter any overlays that were taken from inputs. Its not good to export things that weren't originated in your flake and you don't plan on maintaining.

Change packages builderConstructor to just take an attrset of overlays and the builder can then pull out packages defined in overlays from the channels set.

@Pacman99 Pacman99 requested a review from blaggacao April 25, 2021 04:25
@Pacman99
Copy link
Collaborator Author

Not sure whats up with the nixpkgs-fmt check, I ran it on my system and the file doesn't get changed.

@Pacman99
Copy link
Collaborator Author

This depends on numtide/flake-utils#31

Copy link
Collaborator

@blaggacao blaggacao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an extremely promising API fix, this should make it into the upcoming release.

-- I can copy the issue with nixpkgs-fmt, which is why I proposed the devshell in that other PR

packagesFromOverlaysBuilderConstructor.nix Outdated Show resolved Hide resolved
packagesFromOverlaysBuilderConstructor.nix Outdated Show resolved Hide resolved
overlaysFromChannelsExporter.nix Outdated Show resolved Hide resolved
@Pacman99 Pacman99 force-pushed the cleanup-exporters branch 2 times, most recently from 77619dc to 16b5733 Compare April 25, 2021 07:23
@Pacman99
Copy link
Collaborator Author

This should be ready to go, I just changed the commit to update flake-utils, since the fixup PR has been merged.

Copy link
Owner

@gytis-ivaskevicius gytis-ivaskevicius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, tho Ill need to try it out with odd values to see if it is actually working as expected.

Feel free to merge it whenever you think its ready

overlaysFromChannelsExporter.nix Outdated Show resolved Hide resolved
packagesFromOverlaysBuilderConstructor.nix Outdated Show resolved Hide resolved
@blaggacao blaggacao mentioned this pull request Apr 25, 2021
use pkgs to collect overlays from each channel, since user only passes
overlaysBuilder for each channel. Also filter out any overlays defined
in inputs
Pacman99 added 2 commits April 25, 2021 13:07
This is intended to be self.overlays which allows a cleaner api to pass
what overlays should be collected and used to create packages export
specifically packagesFromOverlaysBuilderConstructor and
overlaysFromChannelsExporter
@Pacman99 Pacman99 merged commit addbb12 into gytis-ivaskevicius:staging Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants