summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-12-07 23:49:25 +0000
committerAlyssa Ross <hi@alyssa.is>2021-12-08 00:32:29 +0000
commit9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3 (patch)
tree0674f15a03c7d2447a2d5ace16dfece76d9d80c5
parentfeb86343bd4227403b5793de5ed76015ff1bc341 (diff)
downloadnixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.tar
nixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.tar.gz
nixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.tar.bz2
nixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.tar.lz
nixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.tar.xz
nixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.tar.zst
nixpkgs-9c4c0f89a5208ed5e994c988cbae2ea47d3a45b3.zip
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.
-rw-r--r--pkgs/build-support/vm/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 7b517333d9e..20df74d3666 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