mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 12:43:52 +00:00
5679b2b698
When something changes in nixos-rebuild, we must make sure the installers still work, otherwise it might break existing setups. The installer tests check whether nixos-rebuild works, so they are a good lithmus test.
29 lines
678 B
Nix
29 lines
678 B
Nix
{ substituteAll
|
|
, runtimeShell
|
|
, coreutils
|
|
, gnused
|
|
, gnugrep
|
|
, nix
|
|
, lib
|
|
, nixosTests
|
|
}:
|
|
let
|
|
fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix;
|
|
in
|
|
substituteAll {
|
|
name = "nixos-rebuild";
|
|
src = ./nixos-rebuild.sh;
|
|
dir = "bin";
|
|
isExecutable = true;
|
|
inherit runtimeShell nix;
|
|
nix_x86_64_linux = fallback.x86_64-linux;
|
|
nix_i686_linux = fallback.i686-linux;
|
|
nix_aarch64_linux = fallback.aarch64-linux;
|
|
path = lib.makeBinPath [ coreutils gnused gnugrep ];
|
|
|
|
# run some a simple installer tests to make sure nixos-rebuild still works for them
|
|
passthru.tests = {
|
|
simple-installer-test = nixosTests.installer.simple;
|
|
};
|
|
}
|