Clean up the filtering
parent
ea430a68d0
commit
1110dde8dc
|
@ -4,7 +4,8 @@
|
|||
# be added to the cache.
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
let filterSet =
|
||||
let
|
||||
filterSet =
|
||||
(f: g: s: builtins.listToAttrs
|
||||
(map
|
||||
(n: { name = n; value = builtins.getAttr n s; })
|
||||
|
@ -14,14 +15,12 @@ let filterSet =
|
|||
)
|
||||
)
|
||||
);
|
||||
isReserved = n: builtins.elem n ["lib" "overlays" "modules"];
|
||||
isBroken = p: ({ meta.broken = false; } // p).meta.broken;
|
||||
in filterSet
|
||||
(n: !(n=="lib"||n=="overlays"||n=="modules")) # filter out non-packages
|
||||
(n: !(isReserved n)) # filter out non-packages
|
||||
(p: (builtins.isAttrs p)
|
||||
&& !(
|
||||
(builtins.hasAttr "meta" p)
|
||||
&& (builtins.hasAttr "broken" p.meta)
|
||||
&& (p.meta.broken)
|
||||
)
|
||||
&& !(isBroken p)
|
||||
)
|
||||
(import ./default.nix { inherit pkgs; })
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
self: super:
|
||||
|
||||
let filterSet =
|
||||
let
|
||||
filterSet =
|
||||
(f: g: s: builtins.listToAttrs
|
||||
(map
|
||||
(n: { name = n; value = builtins.getAttr n s; })
|
||||
|
@ -14,8 +15,9 @@ let filterSet =
|
|||
)
|
||||
)
|
||||
);
|
||||
isReserved = n: builtins.elem n ["lib" "overlays" "modules"];
|
||||
in filterSet
|
||||
(n: !(n=="lib"||n=="overlays"||n=="modules")) # filter out non-packages
|
||||
(n: !(isReserved n)) # filter out non-packages
|
||||
(p: true) # all packages are ok
|
||||
(import ./default.nix { pkgs = super; })
|
||||
|
||||
|
|
Loading…
Reference in New Issue