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.
This commit is contained in:
parent
2c8ef634f6
commit
6262dec8aa
3 changed files with 69 additions and 9 deletions
|
|
@ -20,10 +20,20 @@
|
|||
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
pkgs.writeShellScriptBin "nixery-build-image" ''
|
||||
exec ${pkgs.nix}/bin/nix-build \
|
||||
--show-trace \
|
||||
--no-out-link "$@" \
|
||||
--argstr loadPkgs ${./load-pkgs.nix} \
|
||||
${./build-image.nix}
|
||||
''
|
||||
{
|
||||
build-image = pkgs.writeShellScriptBin "nixery-build-image" ''
|
||||
exec ${pkgs.nix}/bin/nix-build \
|
||||
--show-trace \
|
||||
--no-out-link "$@" \
|
||||
--argstr loadPkgs ${./load-pkgs.nix} \
|
||||
${./build-image.nix}
|
||||
'';
|
||||
|
||||
build-layers = pkgs.writeShellScriptBin "nixery-build-layers" ''
|
||||
exec ${pkgs.nix}/bin/nix-build \
|
||||
--show-trace \
|
||||
--no-out-link "$@" \
|
||||
--argstr loadPkgs ${./load-pkgs.nix} \
|
||||
${./build-layers.nix}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue