summaryrefslogtreecommitdiffstats
path: root/pkgs/default.nix
blob: fb90696eef9d0f547b6949e7eed01f3b05573317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
self: super:

let
  inherit (super) lib mylib;

  pushBack = x: xs:
    if builtins.elem x xs then
      lib.remove x xs ++ [ x ]
    else
      xs;
in

# Import files and subdirectories like they are overlays.
lib.fix
  (builtins.foldl' (lib.flip lib.extends) (_: super)
    (map
      (name: import (./. + "/${name}"))
      (pushBack "override"
        (builtins.attrNames
          (lib.filterAttrs mylib.isNixDirEntry (builtins.readDir ./.))))))