about summary refs log tree commit diff
path: root/tools/nixery/builder/archive.go
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-05-13T15·54+0200
committertazjin <tazjin@tvl.su>2022-05-23T15·04+0000
commit796ff086bea3e060e61d8c56d38441898025ed1c (patch)
tree3fcbe922f6571a42871af449519873a06db5449c /tools/nixery/builder/archive.go
parentd60feb21e8c9744de233bb15662bb6fe9e2f934f (diff)
refactor(nixery): Extract layering logic into separate package r/4105
This will be required for making a standalone, Nixery-style image
builder function usable from Nix.

Change-Id: I5e36348bd4c32d249d56f6628cd046916691319f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5601
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tools/nixery/builder/archive.go')
-rw-r--r--tools/nixery/builder/archive.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/nixery/builder/archive.go b/tools/nixery/builder/archive.go
index 3bc02ab4d5b8..8763e4cb8566 100644
--- a/tools/nixery/builder/archive.go
+++ b/tools/nixery/builder/archive.go
@@ -16,6 +16,8 @@ import (
 	"io"
 	"os"
 	"path/filepath"
+
+	"github.com/google/nixery/layers"
 )
 
 // Create a new compressed tarball from each of the paths in the list
@@ -23,7 +25,7 @@ import (
 //
 // The uncompressed tarball is hashed because image manifests must
 // contain both the hashes of compressed and uncompressed layers.
-func packStorePaths(l *layer, w io.Writer) (string, error) {
+func packStorePaths(l *layers.Layer, w io.Writer) (string, error) {
 	shasum := sha256.New()
 	gz := gzip.NewWriter(w)
 	multi := io.MultiWriter(shasum, gz)