add dockerImage utility

This commit is contained in:
Cadey Ratio 2020-02-28 22:58:21 +00:00
parent bcbed34460
commit 37b64dd0d4
3 changed files with 10 additions and 1 deletions

View File

@ -9,7 +9,8 @@ let
self = {
# nix tools
dhallToNix = import ./dhallToNix.nix;
dhallToNix = import ./pkgs/dhallToNix.nix;
dockerImage = callPackage ./pkgs/dockerImage.nix { };
# other
MoonPlus = callPackage ./pkgs/moonplus { };

8
pkgs/dockerImage.nix Normal file
View File

@ -0,0 +1,8 @@
{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }:
attrs:
pkgs.dockerTools.buildLayeredImage {
config = {
WorkingDir = "/";
};
} // attrs