eval examples on x86_64-linux & aarch64-darwin

quick & easy way to reduce ci run-time and overhead from
platform-specific lock files in the repo while letting
us catch errors on two OSes as well as architectures.
This commit is contained in:
phaer 2024-07-13 16:38:46 +02:00
parent 65bf5d43b1
commit 80cfb95ffc

View File

@ -84,20 +84,24 @@ in {
# map all modules in /examples to a package output in the flake.
checks =
(lib.mapAttrs (_: flakeFile: getPackage flakeFile) allExamples)
// {
repo-with-packages = let
imported =
(import ../../examples/repo-with-packages {
dream2nixSource = ../..;
inherit pkgs;
})
.hello;
in
imported;
repo-with-packages-flake =
(importFlake ../../examples/repo-with-packages-flake/flake.nix).packages.${system}.hello;
};
lib.optionalAttrs
(system == "x86_64-linux" || system == "aarch64-darwin")
(
(lib.mapAttrs (_: flakeFile: getPackage flakeFile) allExamples)
// {
repo-with-packages = let
imported =
(import ../../examples/repo-with-packages {
dream2nixSource = ../..;
inherit pkgs;
})
.hello;
in
imported;
repo-with-packages-flake =
(importFlake ../../examples/repo-with-packages-flake/flake.nix).packages.${system}.hello;
}
);
# work around a bug in nix-fast-build / nix-eval jobs
# TODO: remove this