1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

eval-config: make lib overridable

This enables using flake lib.darwinSystem function with your custom
lib.
This commit is contained in:
zimbatm 2022-09-06 20:55:00 +02:00 committed by Brian McGee
parent 14a12e9ee7
commit 74a0e71ff2
No known key found for this signature in database
GPG key ID: D708AB8298D76283

View file

@ -1,7 +1,11 @@
{ lib }:
let
nixpkgs-lib = lib;
in
{ system ? builtins.currentSystem or "x86_64-darwin"
, pkgs ? null
, lib ? nixpkgs-lib
, modules
, inputs
, baseModules ? import ./modules/module-list.nix
@ -44,7 +48,7 @@ let
literalDocBook = super.literalDocBook or super.literalExample;
});
eval = libExtended.evalModules (builtins.removeAttrs args [ "inputs" "pkgs" "system" ] // {
eval = libExtended.evalModules (builtins.removeAttrs args [ "lib" "inputs" "pkgs" "system" ] // {
modules = modules ++ [ argsModule pkgsModule ] ++ baseModules;
specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs;
});