Skip to content

lib/mkPkgs: don't import external files and get inputs as argument#217

Merged
bors[bot] merged 2 commits intodivnix:corefrom
Pacman99:mkpkgs
Mar 27, 2021
Merged

lib/mkPkgs: don't import external files and get inputs as argument#217
bors[bot] merged 2 commits intodivnix:corefrom
Pacman99:mkpkgs

Conversation

@Pacman99
Copy link
Member

@Pacman99 Pacman99 commented Mar 26, 2021

Changes mkPkgs to take extern, overrides, and pkgs as an argument. This improves their ability to be used as lib functions.

@Pacman99 Pacman99 changed the title Prevent importing files within lib and shell Prevent importing files within lib/mkPkgs and shell Mar 26, 2021
@Pacman99 Pacman99 changed the title Prevent importing files within lib/mkPkgs and shell lib/mkPkgs: don't import external files and get inputs as argument Mar 26, 2021
Copy link
Collaborator

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

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

This looks good. Just want to ask if it's all finished before merging.
bors try

bors bot added a commit that referenced this pull request Mar 27, 2021
@bors
Copy link
Contributor

bors bot commented Mar 27, 2021

try

Build failed:

@nrdxp
Copy link
Collaborator

nrdxp commented Mar 27, 2021

Ah, BORS failed since you added a second argument to mkPkgs, so the call from shell/default.nix needs to be updated with the new args as well.

@Pacman99
Copy link
Member Author

Right, now I remember why I added the pkgs there in the first place. Uhh I'm not sure how to do this.
Shell could manually call extern, but it doesn't have access to the right inputs. Well it does right now, but in the future self might not actually refer to devos, which is why I switched mkPkgs to get inputs from lib so it has all of them. The other option is pass extern and overrides to shell as we do to pkgs, but that would break compat.

@Pacman99 Pacman99 requested a review from nrdxp March 27, 2021 16:45
Copy link
Collaborator

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

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

Looks like it's almost ready.

Pacman99 added 2 commits March 27, 2021 10:09
take extern and overrides as arguments as to not import external files
get inputs as a function dependency from callLib
Copy link
Collaborator

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 27, 2021

Build succeeded:

@bors bors bot merged commit ef1ee6e into divnix:core Mar 27, 2021
@Pacman99 Pacman99 deleted the mkpkgs branch April 1, 2021 20:12
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.

2 participants