Conversation
Update evalArgs to match the new planned API
for clarity's sake, expose which function uses final and prev, so that
people can have a clearer understanding how they relate to each other
in terms of dependencies.
also a simple `{ lib = final; }` probably does not warrant a complete
callLibs obscurization.
if functions where contructors
| lib = utils.lib // { | ||
| inherit (lib) | ||
| mkFlake; | ||
| }; |
There was a problem hiding this comment.
| lib = utils.lib // { | |
| inherit (lib) | |
| mkFlake; | |
| }; | |
| inherit lib; |
Is there a reason not to export the entire devos lib right now? Or even just move the lib down here and refer to it as self.lib when passing to checks.
There was a problem hiding this comment.
Nope, not really. I think before we finalize we should go over this again and only export stuff for which we identify a clear use case.
This, in oder to only commit (resources to maintain) a public api where we create actual value.
| lib = nixpkgs.lib.makeExtensible (self: | ||
| let | ||
| attrs = import ./attrs.nix { lib = nixpkgs.lib // self; }; | ||
| lists = import ./lists.nix { lib = nixpkgs.lib // self; }; | ||
| strings = import ./strings.nix { lib = nixpkgs.lib // self; }; | ||
| in | ||
|
|
||
| utils.lib | ||
|
|
There was a problem hiding this comment.
I like this! 👍
Could we recreate callLibs to just do this for us? callLibs = file: import file { lib = nixpkgs.lib // self; } So it has the same meaning as upstream lib.
There was a problem hiding this comment.
We could not call it callLib though, since that would lead people to put more stuff into it (by analogy of upstream).
I have been thinking of importWithNixpkgsLibAndSelfLib which would be appropriatly scoped, but then it's very likely easier to just grasp the meaning of // at the calling site.
| { lib, self, ... }: | ||
| { lib }: | ||
|
|
||
| { userFlakeSelf }: |
There was a problem hiding this comment.
This should only take nixosConfigurations and as a regular input: nixosConfgurations:. That way it can be used by others too: mkHomeConfigurations self.nixosConfigurations.
There was a problem hiding this comment.
Correct! There are a couple of those still around which I didn't clean up just yet.
I was thinking we can address those while rebasing on fup.
|
bors try |
tryAlready running a review |
tryTimed out. |
This is a pretty long series of internal refactorings in preparation of the stable API change, but that don't just yet change any public API.
I'd like to log this into
corefor the sake of reducing the (chore) commit inventory.