about summary refs log tree commit diff
path: root/default.nix
blob: 439a3d30cb20b79a2e5301a6e38c85961c6c94eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ overlays ? [] } @ args:

let
  inherit (builtins) attrNames filter match pathExists readDir;

  path = ./nixpkgs-overlays;

  overlayPaths =
    filter
      (n: match ".*\\.nix" n != null || pathExists (path + "/${n}/default.nix"))
      (attrNames (readDir path));

in
  import ./nixpkgs (args // {
    overlays = (map (n: import (path + "/${n}")) overlayPaths) ++ overlays;
  })