arion/nix/ci.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

2019-10-04 17:16:41 +02:00
let
sources = import ./sources.nix;
lib = import (sources."nixos-unstable" + "/lib");
2020-03-17 16:46:12 +01:00
inherit (import (sources."project.nix" + "/lib/dimension.nix") { inherit lib; }) dimension;
2019-10-04 17:16:41 +02:00
in
2019-09-28 16:27:07 +02:00
2019-10-04 17:16:41 +02:00
dimension "Nixpkgs version" {
2020-10-01 11:58:43 +02:00
"nixos-20_09" = {
nixpkgsSource = "nixos-20.09";
2019-10-24 19:36:58 +02:00
enableDoc = true;
dockerSupportsSystemd = true;
nixosHasPodmanDockerSocket = false;
2019-10-04 19:29:09 +02:00
};
2021-06-03 08:13:55 +02:00
"nixos-21_05" = {
nixpkgsSource = "nixos-21.05";
enableDoc = true;
};
2020-09-05 23:00:30 +02:00
"nixos-unstable" = {
nixpkgsSource = "nixos-unstable";
isReferenceNixpkgs = true; # match ./default.nix
2020-09-05 23:00:30 +02:00
enableDoc = true;
};
2019-10-04 17:16:41 +02:00
} (
_name: { nixpkgsSource, isReferenceNixpkgs ? false, enableDoc ? true,
2021-05-26 20:58:59 +02:00
dockerSupportsSystemd ? false, nixosHasPodmanDockerSocket ? true }:
2019-10-04 17:16:41 +02:00
dimension "System" {
"x86_64-linux" = { isReferenceTarget = isReferenceNixpkgs; };
2019-10-26 10:31:45 +02:00
"x86_64-darwin" = { enableNixOSTests = false; };
2019-10-04 17:16:41 +02:00
} (
2019-10-26 10:31:45 +02:00
system: { isReferenceTarget ? false, enableNixOSTests ? true }:
2019-10-04 17:16:41 +02:00
let
pkgs = import ./. {
2021-05-26 20:58:59 +02:00
inherit system dockerSupportsSystemd nixosHasPodmanDockerSocket;
nixpkgsSrc = sources.${nixpkgsSource};
};
2019-10-04 17:16:41 +02:00
in
{
2019-10-26 10:31:45 +02:00
inherit (pkgs) arion;
} // lib.optionalAttrs enableNixOSTests {
inherit (pkgs) tests;
2019-10-04 17:16:41 +02:00
} // lib.optionalAttrs enableDoc {
2019-10-24 19:36:58 +02:00
inherit (pkgs) doc doc-options doc-options-check;
} // lib.optionalAttrs isReferenceTarget {
inherit (pkgs.arion-project.haskellPkgs) arion-compose-checked;
2019-10-04 17:16:41 +02:00
}
)
)