Skip to content

Commit

Permalink
build-fhs-user-env-bubblewrap: consistent camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 authored and Atemu committed Aug 17, 2020
1 parent 3f5157f commit b1d86d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
Expand Up @@ -58,7 +58,7 @@ let
exec ${run} "$@"
'';

bwrap_cmd = { init_args ? "" }: ''
bwrapCmd = { initArgs ? "" }: ''
blacklist="/nix /dev /proc /etc"
ro_mounts=""
for i in ${env}/*; do
Expand Down Expand Up @@ -98,17 +98,17 @@ let
${etcBindFlags} \
$ro_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 {
inherit meta;

passthru = passthru // {
env = runCommandLocal "${name}-shell-env" {
shellHook = bwrap_cmd {};
shellHook = bwrapCmd {};
} ''
echo >&2 ""
echo >&2 "*** User chroot 'env' attributes are intended for interactive nix-shell sessions, not for building! ***"
Expand Down
8 changes: 4 additions & 4 deletions pkgs/build-support/build-fhs-userenv-bubblewrap/env.nix
Expand Up @@ -99,14 +99,14 @@ let
};

# setup library paths only for the targeted architecture
setupLibDirs_target = ''
setupLibDirsTarget = ''
# link content of targetPaths
cp -rsHf ${staticUsrProfileTarget}/lib lib
ln -s lib lib${if is64Bit then "64" else "32"}
'';

# setup /lib, /lib32 and /lib64
setupLibDirs_multi = ''
setupLibDirsMulti = ''
mkdir -m0755 lib32
mkdir -m0755 lib64
ln -s lib64 lib
Expand All @@ -124,8 +124,8 @@ let
ln -Ls ${staticUsrProfileTarget}/lib/32/ld-linux.so.2 lib/
'';

setupLibDirs = if isTargetBuild then setupLibDirs_target
else setupLibDirs_multi;
setupLibDirs = if isTargetBuild then setupLibDirsTarget
else setupLibDirsMulti;

# the target profile is the actual profile that will be used for the chroot
setupTargetProfile = ''
Expand Down

0 comments on commit b1d86d0

Please sign in to comment.