mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #300308 from philiptaron/nixos-rebuild
nixos-rebuild: use `substitute` rather than `substituteAll`
This commit is contained in:
commit
ea68c891c4
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user