export packages as checks
This commit is contained in:
parent
1717912538
commit
3b7b5998f1
1 changed files with 23 additions and 17 deletions
40
flake.nix
40
flake.nix
|
@ -51,24 +51,30 @@
|
||||||
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
|
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
|
||||||
netboot-installer = ./nix/netboot-installer/module.nix;
|
netboot-installer = ./nix/netboot-installer/module.nix;
|
||||||
};
|
};
|
||||||
checks.x86_64-linux =
|
checks =
|
||||||
let
|
let
|
||||||
pkgs = nixos-unstable.legacyPackages.x86_64-linux;
|
# re-export the packages as checks
|
||||||
in
|
packages = forAllSystems (system: nixos-unstable.lib.mapAttrs' (n: nixos-unstable.lib.nameValuePair "package-${n}") self.packages.${system});
|
||||||
{
|
checks =
|
||||||
kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix {
|
let
|
||||||
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive;
|
pkgs = nixos-unstable.legacyPackages.x86_64-linux;
|
||||||
};
|
in
|
||||||
shellcheck = pkgs.runCommand "shellcheck"
|
|
||||||
{
|
{
|
||||||
nativeBuildInputs = [ pkgs.shellcheck ];
|
kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix {
|
||||||
} ''
|
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive;
|
||||||
shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun}
|
};
|
||||||
touch $out
|
shellcheck = pkgs.runCommand "shellcheck"
|
||||||
'';
|
{
|
||||||
kexec-installer-2311 = nixos-2311.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix {
|
nativeBuildInputs = [ pkgs.shellcheck ];
|
||||||
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2311-noninteractive;
|
} ''
|
||||||
};
|
shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun}
|
||||||
};
|
touch $out
|
||||||
|
'';
|
||||||
|
kexec-installer-2311 = nixos-2311.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix {
|
||||||
|
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2311-noninteractive;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
nixos-unstable.lib.recursiveUpdate packages { x86_64-linux = checks; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue