Run nixpkgs-fmt .

https://github.com/nix-community/nixpkgs-fmt
This commit is contained in:
Dmitry Ivankov 2020-12-26 21:43:32 +01:00
parent 1b2d11e7d8
commit 1149a2189f
7 changed files with 12 additions and 23 deletions

19
ci.nix
View file

@ -9,12 +9,10 @@
# then your CI will be able to build and cache only those packages for
# which this is possible.
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> { } }:
with builtins;
let
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
isDerivation = p: isAttrs p && p ? type && p.type == "derivation";
isBuildable = p: !(p.meta.broken or false) && p.meta.license.free or true;
@ -29,10 +27,10 @@ let
let
f = p:
if shouldRecurseForDerivations p then flattenPkgs p
else if isDerivation p then [p]
else [];
else if isDerivation p then [ p ]
else [ ];
in
concatMap f (attrValues s);
concatMap f (attrValues s);
outputsOf = p: map (o: p.${o}) p.outputs;
@ -40,13 +38,12 @@ let
nurPkgs =
flattenPkgs
(listToAttrs
(map (n: nameValuePair n nurAttrs.${n})
(filter (n: !isReserved n)
(attrNames nurAttrs))));
(listToAttrs
(map (n: nameValuePair n nurAttrs.${n})
(filter (n: !isReserved n)
(attrNames nurAttrs))));
in
rec {
buildPkgs = filter isBuildable nurPkgs;
cachePkgs = filter isCacheable buildPkgs;