mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
Merge pull request #167393 from iblech/patch-docs-cc
nixos-rebuild, switch-to-configuration: document and protect against cross compilation subtlety
This commit is contained in:
commit
0581d31bf9
|
@ -548,6 +548,14 @@
|
|||
(<replaceable>user@host</replaceable>). You can also set ssh options by
|
||||
defining the <envar>NIX_SSHOPTS</envar> environment variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that <command>nixos-rebuild</command> honors the
|
||||
<literal>nixpkgs.crossSystem</literal> setting of the given configuration
|
||||
but disregards the true architecture of the target host. Hence the
|
||||
<literal>nixpkgs.crossSystem</literal> setting has to match the target
|
||||
platform or else activation will fail.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
#! @perl@/bin/perl
|
||||
|
||||
# Issue #166838 uncovered a situation in which a configuration not suitable
|
||||
# for the target architecture caused a cryptic error message instead of
|
||||
# a clean failure. Due to this mismatch, the perl interpreter in the shebang
|
||||
# line wasn't able to be executed, causing this script to be misinterpreted
|
||||
# as a shell script.
|
||||
#
|
||||
# Let's detect this situation to give a more meaningful error
|
||||
# message. The following two lines are carefully written to be both valid Perl
|
||||
# and Bash.
|
||||
printf "Perl script erroneously interpreted as shell script,\ndoes target platform match nixpkgs.crossSystem platform?\n" && exit 1
|
||||
if 0;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Config::IniFiles;
|
||||
|
|
Loading…
Reference in a new issue