feat: add basic docker image build

This commit is contained in:
Tamipes 2026-01-17 11:19:24 +01:00
parent 737ff501ab
commit c697449b20
2 changed files with 11 additions and 0 deletions

9
docker.nix Normal file
View file

@ -0,0 +1,9 @@
{ dockerTools, my-crate }:
dockerTools.buildLayeredImage {
name = my-crate.pname;
tag = "latest";
contents = [ my-crate ];
config.Cmd = [ ("/bin/" + my-crate.pname) ];
}

View file

@ -123,6 +123,8 @@
my-crate-llvm-coverage = craneLibLLvmTools.cargoLlvmCov (commonArgs // {
inherit cargoArtifacts;
});
docker-image = pkgs.callPackage ./docker.nix { inherit my-crate; };
};
apps.default = flake-utils.lib.mkApp {