This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/lib/default.nix

20 lines
453 B
Nix
Raw Permalink Normal View History

{ inputs, lib, pkgs, ... }:
let
inherit (lib) makeExtensible attrValues foldr;
inherit (modules) mapModules;
modules = import ./modules.nix {
inherit lib;
self.attrs = import ./attrs.nix {
inherit lib;
self = { };
};
};
mylib = makeExtensible (self:
with self;
mapModules ./. (file: import file { inherit self lib pkgs inputs; }));
in mylib.extend (self: super: foldr (a: b: a // b) { } (attrValues super))