about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-17 17:44:14 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-17 17:44:14 +0100
commit778336429cc37ad5b0d736336141d09bf227653d (patch)
tree4aa85bd5d87d5bb5fb2c35ab9313987606abca89 /nixpkgs/pkgs/build-support
parent6b8e2555ef013b579cda57025b17d662e0f1fe1f (diff)
parent7d6929828a2d28eda9d37254ff6be3b6819506ca (diff)
downloadnixlib-778336429cc37ad5b0d736336141d09bf227653d.tar
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.gz
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.bz2
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.lz
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.xz
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.zst
nixlib-778336429cc37ad5b0d736336141d09bf227653d.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/build-support')
-rw-r--r--nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix b/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
index b6b5f13bba97..7d0138a4d85a 100644
--- a/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
+++ b/nixpkgs/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
@@ -149,6 +149,13 @@ let
       done
     fi
 
+    # propagate /etc from the actual host if nested
+    if [[ -e /.host-etc ]]; then
+      ro_mounts+=(--ro-bind /.host-etc /.host-etc)
+    else
+      ro_mounts+=(--ro-bind /etc /.host-etc)
+    fi
+
     for i in ${lib.escapeShellArgs etcBindEntries}; do
       if [[ "''${etc_ignored[@]}" =~ "$i" ]]; then
         continue
@@ -193,7 +200,6 @@ let
       ${lib.optionalString unshareCgroup "--unshare-cgroup"}
       ${lib.optionalString dieWithParent "--die-with-parent"}
       --ro-bind /nix /nix
-      --ro-bind /etc /.host-etc
       ${lib.optionalString privateTmp "--tmpfs /tmp"}
       # Our glibc will look for the cache in its own path in `/nix/store`.
       # As such, we need a cache to exist there, because pressure-vessel