30 lines
495 B
Nix
30 lines
495 B
Nix
{
|
|
pkgs,
|
|
nixpkgs,
|
|
nixng,
|
|
globals,
|
|
...
|
|
}: {
|
|
mkNixNGImage = name: file: let
|
|
stream =
|
|
(import file {
|
|
inherit nixpkgs nixng globals;
|
|
inherit (nixng) nglib;
|
|
})
|
|
.config
|
|
.system
|
|
.build
|
|
.ociImage
|
|
.stream;
|
|
in
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "${name}.tar";
|
|
src = stream;
|
|
dontUnpack = true;
|
|
buildPhase = ''
|
|
$src > $out
|
|
'';
|
|
};
|
|
|
|
nixSnapshotterRef = imagePath: "nix:0${imagePath}";
|
|
}
|