tron/docker.nix

24 lines
524 B
Nix

{ 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";
tag = tron.version;
contents = [ pkgs.cacert ];
config = {
Cmd = [ "${tron}/bin/tron" ];
Env = [ "REGEXES=${tron}/regexes.dhall" ];
WorkingDir = "/";
};
};
in dockerImage tron