arion/nix/ci.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2019-10-04 17:16:41 +02:00
let
sources = import ./sources.nix;
lib = import (sources."nixpkgs" + "/lib");
inherit (import sources."project.nix" { inherit lib; }) dimension;
in
2019-09-28 16:27:07 +02:00
2019-10-04 17:16:41 +02:00
dimension "Nixpkgs version" {
"nixos-19_03" = {
nixpkgsSource = "nixpkgs";
isReferenceNixpkgs = true;
2019-10-24 19:36:58 +02:00
enableDoc = false;
2019-10-04 17:16:41 +02:00
};
2019-10-04 19:29:09 +02:00
"nixos-19_09" = {
nixpkgsSource = "nixos-19.09";
2019-10-24 19:36:58 +02:00
enableDoc = true;
2019-10-04 19:29:09 +02:00
};
2019-10-04 17:16:41 +02:00
"nixos-unstable" = {
nixpkgsSource = "nixos-unstable";
2019-10-24 19:36:58 +02:00
enableDoc = true;
2019-10-04 17:16:41 +02:00
};
} (
_name: { nixpkgsSource, isReferenceNixpkgs ? false, enableDoc ? true }:
2019-10-04 17:16:41 +02:00
dimension "System" {
"x86_64-linux" = { isReferenceTarget = isReferenceNixpkgs; };
2019-10-04 17:16:41 +02:00
# TODO: darwin
# "x86_64-darwin" = { enableNixOSTests = false; };
} (
system: { isReferenceTarget ? false }:
2019-10-04 17:16:41 +02:00
let
pkgs = import ./. { inherit system; nixpkgsSrc = sources.${nixpkgsSource}; };
in
{
inherit (pkgs) arion tests;
} // 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
}
)
)