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

feat: allow extra args to be passed #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

brianmcgee
Copy link
Member

@brianmcgee brianmcgee commented Jun 21, 2024

I tend to customise nixpkgs.lib in my projects using extensions. To accommodate this in a 'blueprint' style I've added extraArgs rather than trying to further customise nixpkgs. This has the added benefit of accommodating wider use cases.

  outputs =
    inputs:
    inputs.blueprint {
      inherit inputs;
      extraArgs = {
        lib = inputs.nixpkgs.lib.extend (import ./lib.nix);
      };
    };

@brianmcgee brianmcgee requested review from zimbatm and phaer June 21, 2024 11:00
@phaer
Copy link
Member

phaer commented Jul 8, 2024

Only saw this now, needs a rebase

@zimbatm
Copy link
Member

zimbatm commented Jul 9, 2024

Still mulling a bit over this.

Notice how the ./lib.nix is loaded with no inputs, so it can only deal with builtins.

Maybe something like this would be better:

extraArgs = { flake, ... }: {
  lib = inputs.nixpkgs.lib.extend flake.lib;
};

We're slowly converging towards a module system.

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.

None yet

3 participants