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
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
builtins.mapAttrs (_: v: lib.recurseIntoAttrs v) default.packages // {
shell = import ./shell.nix;
}
(recurseIntoAttrsRecursive ciDrvs) // { 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].
## 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
breaks, and never build the same package twice!

View File

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