summary refs log tree commit diff
path: root/pkgs/build-support/build-fhs-userenv-bubblewrap
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-11-09 22:46:10 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2021-12-25 19:32:52 +0100
commitf3f82d83302f0ef41df881d38cf21c25c7507898 (patch)
treea4b44ab3e79ce231e2d17d6b2fb7d164b5a40134 /pkgs/build-support/build-fhs-userenv-bubblewrap
parentd471a92e8d0a9d9b5110463ffc7b6d75a8b948c2 (diff)
downloadnixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.tar
nixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.tar.gz
nixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.tar.bz2
nixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.tar.lz
nixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.tar.xz
nixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.tar.zst
nixpkgs-f3f82d83302f0ef41df881d38cf21c25c7507898.zip
steam: fix `/etc/resolv.conf` reference in FHS env
It seems as if it's a problem if `/etc/resolv.conf` is a symlink to
`/run/systemd/resolve/stub-resolv.conf` which is the case when using
`systemd-resolved.service`:

    bwrap: Can't bind mount /oldroot/etc/resolv.conf on /newroot/etc/resolv.conf: Unable to mount source on destination: No such file or directory

I confirmed that by following the symlink of `/etc/resolv.conf`
(pointing to `/run/systemd/resolve/stub-resolv.conf`) with `readlink -f`
the issues are all gone.
Diffstat (limited to 'pkgs/build-support/build-fhs-userenv-bubblewrap')
-rw-r--r--pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix b/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
index 4773a1e2cf6..6443cf6fe04 100644
--- a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
+++ b/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
@@ -70,7 +70,7 @@ let
       "pki"
     ];
   in concatStringsSep "\n  "
-  (map (file: "--ro-bind-try /etc/${file} /etc/${file}") files);
+  (map (file: "--ro-bind-try $(${coreutils}/bin/readlink -f /etc/${file}) /etc/${file}") files);
 
   # Create this on the fly instead of linking from /nix
   # The container might have to modify it and re-run ldconfig if there are