summary refs log tree commit diff
path: root/pkgs/os-specific/linux/spectrum/vm/net/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-08 16:59:24 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-08 18:08:09 +0000
commit769e648d243223613d008276bcac18a164302ba8 (patch)
treedb5f57dd72c9f8901251c47eb97db75e430766b6 /pkgs/os-specific/linux/spectrum/vm/net/default.nix
parentd2e147bedf251976ed99b94b6c905d6761f7a892 (diff)
downloadnixpkgs-769e648d243223613d008276bcac18a164302ba8.tar
nixpkgs-769e648d243223613d008276bcac18a164302ba8.tar.gz
nixpkgs-769e648d243223613d008276bcac18a164302ba8.tar.bz2
nixpkgs-769e648d243223613d008276bcac18a164302ba8.tar.lz
nixpkgs-769e648d243223613d008276bcac18a164302ba8.tar.xz
nixpkgs-769e648d243223613d008276bcac18a164302ba8.tar.zst
nixpkgs-769e648d243223613d008276bcac18a164302ba8.zip
spectrumPackages: update execline backtick uses
execline 2.8.0.0 changed how backtick's options work:

 * -i (exit with the program's error code on failure) and -n (chomp off
   a trailing newline from the captured output) are now the defaults.
 * -E has been introduced, which does importas automatically.

-E is fantastic, because we followed every single use of backtick with
importas.

Even we didn't have -n before, it's okay that chomping will now be
enabled from the default, because in all those cases, there won't be a
trailing newline anyway.

Message-Id: <20210808170439.1372425-1-hi@alyssa.is>
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to '')
-rw-r--r--pkgs/os-specific/linux/spectrum/vm/net/default.nix6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/spectrum/vm/net/default.nix b/pkgs/os-specific/linux/spectrum/vm/net/default.nix
index 5921b62fcf7..75c86b8f92c 100644
--- a/pkgs/os-specific/linux/spectrum/vm/net/default.nix
+++ b/pkgs/os-specific/linux/spectrum/vm/net/default.nix
@@ -54,12 +54,11 @@ runCommand "vm-net" rec {
 
               # Our IP is encoded in the NIC-specific portion of the
               # interface's MAC address.
-              backtick -i CLIENT_IP {
+              backtick -E CLIENT_IP {
                 pipeline { ip -j link show $INTERFACE }
                 pipeline { jq -r ".[0].address | split(\":\") | .[4:6] | \"0x\" + .[]" }
                 xargs printf "100.64.%d.%d"
               }
-              importas -iu CLIENT_IP CLIENT_IP
 
               if { ip address add 169.254.0.1/32 dev $INTERFACE }
               if { ip link set $INTERFACE up }
@@ -121,7 +120,7 @@ runCommand "vm-net" rec {
       '';
       run = writeScript "connman-run" ''
         #! ${execline}/bin/execlineb -S0
-        backtick -in HARDWARE_INTERFACES {
+        backtick -E HARDWARE_INTERFACES {
           pipeline {
             find -L /sys/class/net -mindepth 2 -maxdepth 2 -name address -print0
           }
@@ -132,7 +131,6 @@ runCommand "vm-net" rec {
           # Extract the interface names from the address file paths.
           awk -F/ "{if (NR > 1) printf \",\"; printf \"%s\", $5}"
         }
-        importas -iu HARDWARE_INTERFACES HARDWARE_INTERFACES
 
         ${connman}/bin/connmand -ni $HARDWARE_INTERFACES
       '';