add option nix-bitcoin.pkgOverlays

This simplifies extending `nix-bitcoin.pkgs` and is required for
extension flakes.
For now, mark this as `internal`.
This commit is contained in:
Erik Arvstedt 2023-01-20 13:45:12 +01:00
parent a3bdecb10b
commit 34fe8675bd
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, options, pkgs, lib, ... }:
with lib; with lib;
{ {
@ -8,6 +8,18 @@ with lib;
type = types.attrs; type = types.attrs;
default = (import ../pkgs { inherit pkgs; }).modulesPkgs; default = (import ../pkgs { inherit pkgs; }).modulesPkgs;
defaultText = "nix-bitcoin/pkgs.modulesPkgs"; defaultText = "nix-bitcoin/pkgs.modulesPkgs";
apply = base:
let
final = foldl (prev: overlay:
prev // (overlay prev final)
) base options.nix-bitcoin.pkgOverlays.definitions;
in
final;
};
pkgOverlays = mkOption {
internal = true;
type = with types; functionTo attrs;
}; };
lib = mkOption { lib = mkOption {