From 9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 7 Dec 2021 23:49:25 +0000 Subject: [PATCH] vmTools.runInLinuxVM: create fd symlinks in /dev These are usually set up by systemd, but there's no systemd in the VM. /dev/fd is required for <(...) syntax in bash, and I'm sure lots of things depend on the stdin/stdout/stderr links as well. --- pkgs/build-support/vm/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 7b517333d9e3..20df74d3666d 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -90,6 +90,10 @@ rec { done mount -t devtmpfs devtmpfs /dev + ln -s /proc/self/fd /dev/fd + ln -s /proc/self/fd/0 /dev/stdin + ln -s /proc/self/fd/1 /dev/stdout + ln -s /proc/self/fd/2 /dev/stderr ifconfig lo up