dockerTools.buildLayeredImage: configurable store root

`stream_layered_image.py` currently assumes that the store root will be
at `/nix/store`, although the user might have configured this
differently. This makes `buildLayeredImage` unusable with stores having
a different root, as they will fail an assertion in the python script.

This change updates that assertion to use `builtins.storeDir` as the
source of truth about where the store lives, instead of assuming
`/nix/store`.
This commit is contained in:
Louis Blin
2021-03-10 16:44:53 +00:00
parent 0124e874f6
commit bf56388c92
2 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -841,12 +841,14 @@ rec {
cat ${baseJson} | jq '
. + {
"store_dir": $store_dir,
"store_layers": $store_layers,
"customisation_layer", $customisation_layer,
"repo_tag": $repo_tag,
"created": $created
}
' --argjson store_layers "$store_layers" \
' --arg store_dir "${storeDir}" \
--argjson store_layers "$store_layers" \
--arg customisation_layer ${customisationLayer} \
--arg repo_tag "$imageName:$imageTag" \
--arg created "$created" |