depot/third_party/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/default.nix
Default email 8a45d4525b Project import generated by Copybara.
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
2022-03-30 11:31:56 +02:00

36 lines
1,011 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;
};
meta = {
description = "Rebuild your NixOS configuration and switch to it, on local hosts and remote.";
homepage = "https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/nixos-rebuild";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.Profpatsch ];
mainProgram = "nixos-rebuild";
};
}