Merge pull request #87182 from edolstra/no-experimental

Don't use the 'nix' command

Changed files
+6 -27
nixos
doc
lib
test-driver
modules
installer
services
-16
nixos/doc/manual/man-nixos-install.xml
···
</group>
</arg>
<arg>
-
<group choice='req'>
-
<arg choice='plain'>
-
<option>--print-build-logs</option>
-
</arg>
-
<arg choice='plain'>
-
<option>-L</option>
-
</arg>
-
</group>
-
</arg>
-
<arg>
<arg choice='plain'>
<option>-I</option>
</arg>
···
information is printed on standard error, never on standard
output.</para>
<para>Please note that this option may be specified repeatedly.</para>
-
</listitem>
-
</varlistentry>
-
<varlistentry>
-
<term><option>--print-build-logs</option> / <option>-L</option></term>
-
<listitem>
-
<para>Print the full build logs of <command>nix build</command> to stderr.</para>
</listitem>
</varlistentry>
<varlistentry>
+3 -3
nixos/lib/test-driver/test-driver.py
···
self.logfile = os.environ.get("LOGFILE", "/dev/null")
self.logfile_handle = codecs.open(self.logfile, "wb")
self.xml = XMLGenerator(self.logfile_handle, encoding="utf-8")
-
self.queue: "Queue[Dict[str, str]]" = Queue(1000)
+
self.queue: "Queue[Dict[str, str]]" = Queue()
self.xml.startDocument()
self.xml.startElement("logfile", attrs={})
···
def execute(self, command: str) -> Tuple[int, str]:
self.connect()
-
out_command = "( {} ); echo '|!EOF' $?\n".format(command)
+
out_command = "( {} ); echo '|!=EOF' $?\n".format(command)
self.shell.send(out_command.encode())
output = ""
-
status_code_pattern = re.compile(r"(.*)\|\!EOF\s+(\d+)")
+
status_code_pattern = re.compile(r"(.*)\|\!=EOF\s+(\d+)")
while True:
chunk = self.shell.recv(4096).decode(errors="ignore")
+2 -6
nixos/modules/installer/tools/nixos-install.sh
···
channelPath=
system=
verbosity=()
-
buildLogs=
while [ "$#" -gt 0 ]; do
i="$1"; shift 1
···
-v*|--verbose)
verbosity+=("$i")
;;
-
-L|--print-build-logs)
-
buildLogs="$i"
-
;;
*)
echo "$0: unknown option \`$i'"
exit 1
···
if [[ -z $system ]]; then
echo "building the configuration in $NIXOS_CONFIG..."
outLink="$tmpdir/system"
-
nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" \
+
nix-build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" \
--extra-substituters "$sub" \
-
-f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs}
+
'<nixpkgs/nixos>' -A system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]}
system=$(readlink -f $outLink)
fi
+1 -2
nixos/modules/services/misc/nix-daemon.nix
···
system.activationScripts.nix = stringAfter [ "etc" "users" ]
''
-
# Create directories in /nix.
-
${nix}/bin/nix ping-store --no-net
+
install -m 0755 -d /nix/var/nix/{gcroots,profiles}/per-user
# Subscribe the root user to the NixOS channel by default.
if [ ! -e "/root/.nix-channels" ]; then