From 44f855d14ee40dfeaf52c4f01e2de124fe0f18fc Mon Sep 17 00:00:00 2001 From: Ben Radford Date: Wed, 19 Jul 2023 15:09:58 +0100 Subject: [PATCH] Missing addTextToStore function. --- tests/overlay-local-store/common.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/overlay-local-store/common.sh b/tests/overlay-local-store/common.sh index 0e98e931f..2fba2e7f6 100644 --- a/tests/overlay-local-store/common.sh +++ b/tests/overlay-local-store/common.sh @@ -59,3 +59,12 @@ initLowerStore () { execUnshare () { exec unshare --mount --map-root-user "$SHELL" "$@" } + +addTextToStore() { + storeDir=$1; shift + filename=$1; shift + content=$1; shift + filePath="$TEST_HOME/$filename" + echo "$content" > "$filePath" + nix-store --store "$storeDir" --add "$filePath" +}