mergeDrvs
pkgs.dockerTools.mergeDrvs
Docs pulled from | This Revision | 18 days ago
Nixpkgs manual
buildEnv creates symlinks to dirs, which is hard to edit inside the overlay VM
Noogle detected
Implementation
The following is the current implementation of this function.
mergeDrvs =
{
derivations,
onlyDeps ? false,
}:
runCommand "merge-drvs"
{
inherit derivations onlyDeps;
}
''
if [[ -n "$onlyDeps" ]]; then
echo $derivations > $out
exit 0
fi
mkdir $out
for derivation in $derivations; do
echo "Merging $derivation..."
if [[ -d "$derivation" ]]; then
# If it's a directory, copy all of its contents into $out.
cp -drf --preserve=mode -f $derivation/* $out/
else
# Otherwise treat the derivation as a tarball and extract it
# into $out.
tar -C $out -xpf $drv || true
fi
done
'';