forked from cadey/maj
25 lines
487 B
Nix
25 lines
487 B
Nix
|
{ system ? builtins.currentSystem }:
|
||
|
|
||
|
let
|
||
|
pkgs = import <nixpkgs> { };
|
||
|
callPackage = pkgs.lib.callPackageWith pkgs;
|
||
|
crates = callPackage ./default.nix { };
|
||
|
|
||
|
dockerImage = pkg:
|
||
|
pkgs.dockerTools.buildLayeredImage {
|
||
|
name = "xena/${pkg.name}";
|
||
|
tag = "latest";
|
||
|
|
||
|
contents = [ pkg ];
|
||
|
|
||
|
config = {
|
||
|
Cmd = [ "/bin/${pkg.name}" ];
|
||
|
WorkingDir = "/";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
in {
|
||
|
majc = dockerImage crates.majc;
|
||
|
majsite = dockerImage crates.majsite;
|
||
|
}
|