diff options
author | Vincent Ambo <tazjin@google.com> | 2019-09-30T13·19+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-10-03T12·21+0100 |
commit | 6262dec8aacf25ae6004de739353089cd635cea5 (patch) | |
tree | 98da57af6cba292c63901510ed9b49bc9dcf63ca /tools/nixery/default.nix | |
parent | 2c8ef634f67f91c8efc1cf6a58a271f4c44544dd (diff) |
feat(nix): Add derivation to create layer tars from a store path set
This introduces a new Nix derivation that, given an attribute set of layer hashes mapped to store paths, will create a layer tarball for each of the store paths. This is going to be used by the builder to create layers that are not present in the cache. Relates to #50.
Diffstat (limited to 'tools/nixery/default.nix')
-rw-r--r-- | tools/nixery/default.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix index f321b07a9c7a..925edbf6dc84 100644 --- a/tools/nixery/default.nix +++ b/tools/nixery/default.nix @@ -11,13 +11,15 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + { pkgs ? import <nixpkgs> { } , preLaunch ? "" , extraPackages ? [] }: with pkgs; -rec { +let builders = import ./build-image { inherit pkgs; }; +in rec { # Go implementation of the Nixery server which implements the # container registry interface. # @@ -27,7 +29,8 @@ rec { nixery-server = callPackage ./server { }; # Implementation of the Nix image building logic - nixery-build-image = import ./build-image { inherit pkgs; }; + nixery-build-image = builders.build-image; + nixery-build-layers = builders.build-layers; # Use mdBook to build a static asset page which Nixery can then # serve. This is primarily used for the public instance at |