diff options
author | Vincent Ambo <tazjin@google.com> | 2019-10-02T14·31+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-10-03T12·21+0100 |
commit | 64fca61ea1d898c01893f56f0e03913f36468f5d (patch) | |
tree | b026b15f8077f33a5639f79722ccef8f1d83e96b /tools/nixery/server/builder | |
parent | f4f290957305a5a81292edef717a18a7c36be4bf (diff) |
fix(server): Upload symlink layer created by first Nix build
This layer is needed in addition to those that are built in the second Nix build.
Diffstat (limited to 'tools/nixery/server/builder')
-rw-r--r-- | tools/nixery/server/builder/builder.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/nixery/server/builder/builder.go b/tools/nixery/server/builder/builder.go index ddfd4a078229..87776735f9e7 100644 --- a/tools/nixery/server/builder/builder.go +++ b/tools/nixery/server/builder/builder.go @@ -63,7 +63,10 @@ type Image struct { Packages []string } -// TODO(tazjin): docstring +// BuildResult represents the data returned from the server to the +// HTTP handlers. Error information is propagated straight from Nix +// for errors inside of the build that should be fed back to the +// client (such as missing packages). type BuildResult struct { Error string `json:"error"` Pkgs []string `json:"pkgs"` @@ -382,6 +385,8 @@ func BuildImage(ctx context.Context, s *State, image *Image) (*BuildResult, erro return nil, err } + layerResult[imageResult.SymlinkLayer.SHA256] = imageResult.SymlinkLayer.Path + layers := []manifest.Entry{} for key, path := range layerResult { f, err := os.Open(path) |