simplify overlay.nix

Move pkg definitions to pkgs/default.nix.
This allows us to just import the pkgs in overlay.nix and get rid of
the filtering to exclude the modules.
This commit is contained in:
Erik Arvstedt
2019-11-27 14:04:17 +01:00
parent 07dc3e04ac
commit 7e021a2629
3 changed files with 15 additions and 34 deletions

View File

@@ -1,21 +1 @@
# You can use this file as a nixpkgs overlay.
# It's useful in the case where you don't want to add the whole NUR namespace
# to your configuration.
self: super:
let filterSet =
(f: g: s: builtins.listToAttrs
(map
(n: { name = n; value = builtins.getAttr n s; })
(builtins.filter
(n: f n && g (builtins.getAttr n s))
(builtins.attrNames s)
)
)
);
in filterSet
(n: !(n=="lib"||n=="overlays"||n=="modules")) # filter out non-packages
(p: true) # all packages are ok
(import ./default.nix { pkgs = super; })
self: super: import ./pkgs { pkgs = super; }