mv nix/ci.nix directly to default.nix

This commit is contained in:
Timothy DeHerrera 2021-04-18 21:00:45 -06:00
parent 127cb25bd1
commit f254304796
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122
4 changed files with 29 additions and 37 deletions

View file

@ -1,8 +1,31 @@
let let
inherit (default.inputs.nixos) lib; inherit (default.inputs.nixos) lib;
default = (import ./lib/compat).defaultNix; default = (import "${./lib}/compat").defaultNix;
ciSystems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
];
filterSystems = lib.filterAttrs
(system: _: lib.elem system ciSystems);
recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
if lib.isAttrs v
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
else v
);
systemOutputs = lib.filterAttrs
(name: set: lib.isAttrs set
&& lib.any
(system: set ? ${system} && name != "legacyPackages")
ciSystems
)
default.outputs;
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs;
in in
builtins.mapAttrs (_: v: lib.recurseIntoAttrs v) default.packages // { (recurseIntoAttrsRecursive ciDrvs) // { shell = import ./shell.nix; }
shell = import ./shell.nix;
}

View file

@ -15,7 +15,7 @@ binary cache (and of course you do), be sure _not_ to skip the
[binary-caches.json][cache]. [binary-caches.json][cache].
## Ready to Use ## Ready to Use
The repo is already set up with the proper _nix/ci.nix_ file, building all The repo is already set up with the proper _default.nix_ file, building all
declared packages, checks, profiles and shells. So you can see if something declared packages, checks, profiles and shells. So you can see if something
breaks, and never build the same package twice! breaks, and never build the same package twice!

View file

@ -1,7 +1,7 @@
let let
inherit (lock.nodes.flake-compat.locked) rev narHash; inherit (lock.nodes.flake-compat.locked) rev narHash;
lock = builtins.fromJSON (builtins.readFile ../../flake.lock); lock = builtins.fromJSON (builtins.readFile "${../..}/flake.lock");
flake = (import flake = (import
( (
fetchTarball { fetchTarball {

View file

@ -1,31 +0,0 @@
let
inherit (default.inputs.nixos) lib;
default = (import "${../lib}/compat").defaultNix;
ciSystems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
];
filterSystems = lib.filterAttrs
(system: _: lib.elem system ciSystems);
recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
if lib.isAttrs v
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
else v
);
systemOutputs = lib.filterAttrs
(name: set: lib.isAttrs set
&& lib.any
(system: set ? ${system} && name != "legacyPackages")
ciSystems
)
default.outputs;
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs;
in
recurseIntoAttrsRecursive ciDrvs