Merge pull request #300308 from philiptaron/nixos-rebuild

nixos-rebuild: use `substitute` rather than `substituteAll`
This commit is contained in:
Robert Hensing 2024-03-30 21:04:00 +01:00 committed by GitHub
commit ea68c891c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
{ callPackage
, substituteAll
, substitute
, runtimeShell
, coreutils
, gnused
@ -14,19 +14,25 @@
let
fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix;
in
substituteAll {
substitute {
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 jq util-linux ];
substitutions = [
"--subst-var-by" "runtimeShell" runtimeShell
"--subst-var-by" "nix" nix
"--subst-var-by" "nix_x86_64_linux" fallback.x86_64-linux
"--subst-var-by" "nix_i686_linux" fallback.i686-linux
"--subst-var-by" "nix_aarch64_linux" fallback.aarch64-linux
"--subst-var-by" "path" (lib.makeBinPath [ coreutils gnused gnugrep jq util-linux ])
];
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
installManPage ${./nixos-rebuild.8}