diff --git a/flake.nix b/flake.nix index d338329..149a76b 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,32 @@ WorkingDir = "/state"; }; }; + + cross = flake-utils.lib.eachDefaultSystem (crossSystem: + let + pkgs = import nixpkgs { + localSystem = system; + inherit crossSystem; + }; + in + { + default = pkgs.python311Packages.buildPythonApplication { + pname = "aci-backend"; + inherit version; + propagatedBuildInputs = dependencies pkgs.python311Packages; + src = ./backend; + }; + + docker = pkgs.dockerTools.buildLayeredImage { + name = self.packages.${system}.cross.default.${crossSystem}.pname; + tag = "latest"; + contents = [ self.packages.${system}.cross.default.${crossSystem} pkgs.busybox ]; + config = { + Cmd = [ "/bin/app.py" ]; + WorkingDir = "/state"; + }; + }; + }); }; devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [