mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
nixos/top-level: Check syntax of switch-to-configuration
This commit is contained in:
parent
6f1e0dc34f
commit
b30d619368
@ -78,6 +78,13 @@ let
|
||||
export localeArchive="${config.i18n.glibcLocales}/lib/locale/locale-archive"
|
||||
substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration
|
||||
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
|
||||
echo "switch-to-configuration syntax is not valid:"
|
||||
echo "$output"
|
||||
exit 1
|
||||
fi
|
||||
''}
|
||||
|
||||
echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user