git.iko.soy/typeable/nixpkgs
on master help sign in
fhs-bubblewrap: merge /usr/share from both archs
commitbdd902776093bca7e004c5eade5a19557bbd4bdd authorLuigi Sartor Piucco <luigipiucco@gmail.com> dateWed 3 Feb 2021, 21:25 (6 years ago) parent28c9688
1 file changed+15−2
pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix+15−2
pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix+15−2
@@ -1,4 +1,4 @@
1−{ stdenv, buildEnv, writeText, writeScriptBin, pkgs, pkgsi686Linux }:
1+{ stdenv, lib, buildEnv, writeText, writeScriptBin, pkgs, pkgsi686Linux }:
22
33{ name, profile ? ""
44, targetPkgs ? pkgs: [], multiPkgs ? pkgs: []
@@ -138,7 +138,20 @@ let
138138 mkdir -m0755 usr
139139 cd usr
140140 ${setupLibDirs}
141− for i in bin sbin share include; do
141+ ${lib.optionalString isMultiBuild ''
142+ if [ -d "${staticUsrProfileMulti}/share" ]; then
143+ cp -rLf ${staticUsrProfileMulti}/share share
144+ fi
145+ ''}
146+ if [ -d "${staticUsrProfileTarget}/share" ]; then
147+ if [ -d share ]; then
148+ chmod -R 755 share
149+ cp -rLTf ${staticUsrProfileTarget}/share share
150+ else
151+ cp -rLf ${staticUsrProfileTarget}/share share
152+ fi
153+ fi
154+ for i in bin sbin include; do
142155 if [ -d "${staticUsrProfileTarget}/$i" ]; then
143156 cp -rsHf "${staticUsrProfileTarget}/$i" "$i"
144157 fi