mv nix/ci.nix
directly to default.nix
This commit is contained in:
parent
127cb25bd1
commit
f254304796
31
default.nix
31
default.nix
@ -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; }
|
||||
|
@ -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!
|
||||
|
||||
|
@ -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 {
|
||||
|
31
nix/ci.nix
31
nix/ci.nix
@ -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
|
Loading…
Reference in New Issue
Block a user