diff options
author | Nikolay Amiantov <ab@fmap.me> | 2015-11-23 19:49:20 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2015-11-23 19:54:07 +0300 |
commit | 6d6c1d352336ddde41b50a78196018b676957571 (patch) | |
tree | d3c86aeaa4cd0eac0ed02c1ec64e5660baf62001 /pkgs/build-support | |
parent | d0589b0c549d22ee7c981989a5f915b3b7d5f002 (diff) | |
download | nixlib-6d6c1d352336ddde41b50a78196018b676957571.tar nixlib-6d6c1d352336ddde41b50a78196018b676957571.tar.gz nixlib-6d6c1d352336ddde41b50a78196018b676957571.tar.bz2 nixlib-6d6c1d352336ddde41b50a78196018b676957571.tar.lz nixlib-6d6c1d352336ddde41b50a78196018b676957571.tar.xz nixlib-6d6c1d352336ddde41b50a78196018b676957571.tar.zst nixlib-6d6c1d352336ddde41b50a78196018b676957571.zip |
chrootenv: fix include directories
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/build-fhs-chrootenv/env.nix | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pkgs/build-support/build-fhs-chrootenv/env.nix b/pkgs/build-support/build-fhs-chrootenv/env.nix index 634ee0b06927..c4b5a18521af 100644 --- a/pkgs/build-support/build-fhs-chrootenv/env.nix +++ b/pkgs/build-support/build-fhs-chrootenv/env.nix @@ -157,29 +157,25 @@ let setupLibDirs = if isTargetBuild then setupLibDirs_target else setupLibDirs_multi; - setupIncludeDir = '' - if [ -x "${staticUsrProfileTarget}/include" ] - then - ln -s "${staticUsrProfileTarget}/include" - fi - ''; - # the target profile is the actual profile that will be used for the chroot setupTargetProfile = '' mkdir -m0755 usr cd usr ${setupLibDirs} - ${setupIncludeDir} for i in bin sbin share include; do - cp -r "${staticUsrProfileTarget}/$i" $i + if [ -d "${staticUsrProfileTarget}/$i" ]; then + cp -r "${staticUsrProfileTarget}/$i" "$i" + fi done cd .. for i in var etc; do - cp -r "${staticUsrProfileTarget}/$i" "$i" + if [ -d "${staticUsrProfileTarget}/$i" ]; then + cp -r "${staticUsrProfileTarget}/$i" "$i" + fi done for i in usr/{bin,sbin,lib,lib32,lib64}; do - if [ -x "$i" ]; then + if [ -d "$i" ]; then ln -s "$i" fi done |