commit
1ab421bfa7
|
@ -22,7 +22,7 @@ install:
|
||||||
- travis_retry nix-channel --update
|
- travis_retry nix-channel --update
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- outs=$(nix-build non-broken.nix) && echo Produced $outs
|
- outs=$(nix-build buildable.nix) && echo Produced $outs
|
||||||
- nix eval -f default.nix 'lib'
|
- nix eval -f default.nix 'lib'
|
||||||
- nix eval -f default.nix 'modules'
|
- nix eval -f default.nix 'modules'
|
||||||
- nix eval -f default.nix 'overlays'
|
- nix eval -f default.nix 'overlays'
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
# This file filters out all the unbuildable packages from your package set.
|
||||||
|
# It's what gets built by CI, so if you correctly mark broken/unfree packages
|
||||||
|
# as such your CI will not try to build them and the buildable packages will
|
||||||
|
# be added to the cache.
|
||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
|
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)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
isReserved = n: builtins.elem n ["lib" "overlays" "modules"];
|
||||||
|
isBroken = p: p.meta.broken or false;
|
||||||
|
isFree = p: p.meta.license.free or true;
|
||||||
|
in filterSet
|
||||||
|
(n: !(isReserved n)) # filter out non-packages
|
||||||
|
(p: (builtins.isAttrs p)
|
||||||
|
&& !(isBroken p)
|
||||||
|
&& isFree p
|
||||||
|
)
|
||||||
|
(import ./default.nix { inherit pkgs; })
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
# This file filters out all the broken packages from your package set.
|
|
||||||
# It's what gets built by CI, so if you correctly mark broken packages as
|
|
||||||
# broken your CI will not try to build them and the non-broken packages will
|
|
||||||
# be added to the cache.
|
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
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: (builtins.isAttrs p)
|
|
||||||
&& !(
|
|
||||||
(builtins.hasAttr "meta" p)
|
|
||||||
&& (builtins.hasAttr "broken" p.meta)
|
|
||||||
&& (p.meta.broken)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(import ./default.nix { inherit pkgs; })
|
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
self: super:
|
self: super:
|
||||||
|
|
||||||
let filterSet =
|
let
|
||||||
|
filterSet =
|
||||||
(f: g: s: builtins.listToAttrs
|
(f: g: s: builtins.listToAttrs
|
||||||
(map
|
(map
|
||||||
(n: { name = n; value = builtins.getAttr n s; })
|
(n: { name = n; value = builtins.getAttr n s; })
|
||||||
|
@ -14,8 +15,9 @@ let filterSet =
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
isReserved = n: builtins.elem n ["lib" "overlays" "modules"];
|
||||||
in filterSet
|
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
|
(p: true) # all packages are ok
|
||||||
(import ./default.nix { pkgs = super; })
|
(import ./default.nix { pkgs = super; })
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue