tron/docker.nix

24 lines
524 B
Nix
Raw Normal View History

2020-07-04 01:03:43 +00:00
{ system ? builtins.currentSystem }:
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs { };
callPackage = pkgs.lib.callPackageWith pkgs;
tron = callPackage ./default.nix { };
dockerImage = pkg:
pkgs.dockerTools.buildLayeredImage {
name = "xena/tron";
2020-07-04 01:33:06 +00:00
tag = tron.version;
2020-07-04 01:03:43 +00:00
2020-07-04 01:33:06 +00:00
contents = [ pkgs.cacert ];
2020-07-04 01:03:43 +00:00
config = {
2020-07-04 01:33:06 +00:00
Cmd = [ "${tron}/bin/tron" ];
Env = [ "REGEXES=${tron}/regexes.dhall" ];
2020-07-04 01:03:43 +00:00
WorkingDir = "/";
};
};
in dockerImage tron