Run build against both stable nix and nixUnstable in CI

This commit is contained in:
adisbladis 2022-01-08 09:06:12 +13:00
parent a0bd67f9cb
commit 9bcb1bb3fc

View file

@ -13,31 +13,38 @@
rec { rec {
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs; packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs;
checks = { checks =
let
mkVariant = nix: packages.nix-eval-jobs.overrideAttrs (_: {
name = "nix-eval-jobs-${nix.version}";
inherit (nix) version;
});
in
{
editorconfig = pkgs.runCommand "editorconfig-check" editorconfig = pkgs.runCommand "editorconfig-check"
{ {
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.editorconfig-checker pkgs.editorconfig-checker
]; ];
} '' } ''
editorconfig-checker ${self} editorconfig-checker ${self}
touch $out touch $out
''; '';
nixpkgs-fmt = pkgs.runCommand "fmt-check" nixpkgs-fmt = pkgs.runCommand "fmt-check"
{ {
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.nixpkgs-fmt pkgs.nixpkgs-fmt
]; ];
} '' } ''
nixpkgs-fmt --check . nixpkgs-fmt --check .
touch $out touch $out
''; '';
build = packages.nix-eval-jobs; build = mkVariant pkgs.nix;
build-unstable = mkVariant pkgs.nixUnstable;
}; };
defaultPackage = self.packages.${system}.nix-eval-jobs; defaultPackage = self.packages.${system}.nix-eval-jobs;
devShell = pkgs.callPackage ./shell.nix drvArgs; devShell = pkgs.callPackage ./shell.nix drvArgs;