build-fhs-user-env-bubblewrap: consistent camelCase
This commit is contained in:
parent
3f5157f122
commit
b1d86d0e51
@ -58,7 +58,7 @@ let
|
|||||||
exec ${run} "$@"
|
exec ${run} "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bwrap_cmd = { init_args ? "" }: ''
|
bwrapCmd = { initArgs ? "" }: ''
|
||||||
blacklist="/nix /dev /proc /etc"
|
blacklist="/nix /dev /proc /etc"
|
||||||
ro_mounts=""
|
ro_mounts=""
|
||||||
for i in ${env}/*; do
|
for i in ${env}/*; do
|
||||||
@ -98,17 +98,17 @@ let
|
|||||||
${etcBindFlags} \
|
${etcBindFlags} \
|
||||||
$ro_mounts \
|
$ro_mounts \
|
||||||
$auto_mounts \
|
$auto_mounts \
|
||||||
${init runScript}/bin/${name}-init ${init_args}
|
${init runScript}/bin/${name}-init ${initArgs}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bin = writeShellScriptBin name (bwrap_cmd { init_args = ''"$@"''; });
|
bin = writeShellScriptBin name (bwrapCmd { initArgs = ''"$@"''; });
|
||||||
|
|
||||||
in runCommandLocal name {
|
in runCommandLocal name {
|
||||||
inherit meta;
|
inherit meta;
|
||||||
|
|
||||||
passthru = passthru // {
|
passthru = passthru // {
|
||||||
env = runCommandLocal "${name}-shell-env" {
|
env = runCommandLocal "${name}-shell-env" {
|
||||||
shellHook = bwrap_cmd {};
|
shellHook = bwrapCmd {};
|
||||||
} ''
|
} ''
|
||||||
echo >&2 ""
|
echo >&2 ""
|
||||||
echo >&2 "*** User chroot 'env' attributes are intended for interactive nix-shell sessions, not for building! ***"
|
echo >&2 "*** User chroot 'env' attributes are intended for interactive nix-shell sessions, not for building! ***"
|
||||||
|
@ -99,14 +99,14 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
# setup library paths only for the targeted architecture
|
# setup library paths only for the targeted architecture
|
||||||
setupLibDirs_target = ''
|
setupLibDirsTarget = ''
|
||||||
# link content of targetPaths
|
# link content of targetPaths
|
||||||
cp -rsHf ${staticUsrProfileTarget}/lib lib
|
cp -rsHf ${staticUsrProfileTarget}/lib lib
|
||||||
ln -s lib lib${if is64Bit then "64" else "32"}
|
ln -s lib lib${if is64Bit then "64" else "32"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# setup /lib, /lib32 and /lib64
|
# setup /lib, /lib32 and /lib64
|
||||||
setupLibDirs_multi = ''
|
setupLibDirsMulti = ''
|
||||||
mkdir -m0755 lib32
|
mkdir -m0755 lib32
|
||||||
mkdir -m0755 lib64
|
mkdir -m0755 lib64
|
||||||
ln -s lib64 lib
|
ln -s lib64 lib
|
||||||
@ -124,8 +124,8 @@ let
|
|||||||
ln -Ls ${staticUsrProfileTarget}/lib/32/ld-linux.so.2 lib/
|
ln -Ls ${staticUsrProfileTarget}/lib/32/ld-linux.so.2 lib/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupLibDirs = if isTargetBuild then setupLibDirs_target
|
setupLibDirs = if isTargetBuild then setupLibDirsTarget
|
||||||
else setupLibDirs_multi;
|
else setupLibDirsMulti;
|
||||||
|
|
||||||
# the target profile is the actual profile that will be used for the chroot
|
# the target profile is the actual profile that will be used for the chroot
|
||||||
setupTargetProfile = ''
|
setupTargetProfile = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user