Skip to content

Commit 85581d2

Browse files
committed
codedown.nix: update importChannel args
1 parent 3370906 commit 85581d2

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

codedown.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,19 @@ rec {
7070

7171
nixpkgsOverlay = callPackage ./nix/nixpkgs-overlay.nix { inherit searcher; };
7272

73-
importChannel = maybeBootstrap: name: value:
73+
importChannel = {
74+
bootstrapNixpkgs ? null,
75+
nixpkgsConfig ? {},
76+
channel
77+
}:
7478
let
75-
imported = import value;
79+
imported = import channel;
7680
overlays = [nixpkgsOverlay];
7781
in
7882
# Import codedown-languages
79-
if (builtins.isFunction imported && builtins.hasAttr "isCodeDown" (builtins.functionArgs imported)) then imported ({ inherit system; } // lib.optionalAttrs (maybeBootstrap != null) { inherit (maybeBootstrap) fetchFromGitHub; })
83+
if (builtins.isFunction imported && builtins.hasAttr "isCodeDown" (builtins.functionArgs imported)) then imported ({ inherit system; } // lib.optionalAttrs (bootstrapNixpkgs != null) { inherit (bootstrapNixpkgs) fetchFromGitHub; })
8084
# Import Nixpkgs
81-
else if (builtins.isFunction imported && builtins.hasAttr "overlays" (builtins.functionArgs imported)) then imported { inherit overlays system; }
85+
else if (builtins.isFunction imported && builtins.hasAttr "overlays" (builtins.functionArgs imported)) then imported { inherit overlays system; config = nixpkgsConfig; }
8286
# Generic import
8387
else if (builtins.isFunction imported) then imported { inherit system; }
8488
else imported

0 commit comments

Comments
 (0)