mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/activatable-system: Make substitutions explicit
This helps with understanding the code. We might make this not depend on environment variables later. systemBuilderArgs is a form of global state, which isn't helpful.
This commit is contained in:
parent
a16986f1a3
commit
193f4fea90
1 changed files with 13 additions and 1 deletions
|
@ -34,7 +34,19 @@ in
|
|||
unset activationScript dryActivationScript
|
||||
|
||||
mkdir $out/bin
|
||||
substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration
|
||||
substitute ${./switch-to-configuration.pl} $out/bin/switch-to-configuration \
|
||||
--subst-var coreutils \
|
||||
--subst-var distroId \
|
||||
--subst-var installBootLoader \
|
||||
--subst-var localeArchive \
|
||||
--subst-var out \
|
||||
--subst-var perl \
|
||||
--subst-var shell \
|
||||
--subst-var su \
|
||||
--subst-var systemd \
|
||||
--subst-var utillinux \
|
||||
;
|
||||
|
||||
chmod +x $out/bin/switch-to-configuration
|
||||
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
|
||||
if ! output=$($perl/bin/perl -c $out/bin/switch-to-configuration 2>&1); then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue