diff --git a/.gitignore b/.gitignore index 2d1d82a57f..ffa2ed68ce 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ zerobot ZeroBot-Plugin* *.syso /.direnv +/result \ No newline at end of file diff --git a/default.nix b/default.nix index b7b0081310..ecde3a4a81 100644 --- a/default.nix +++ b/default.nix @@ -14,12 +14,12 @@ }: buildGoApplication { pname = "ZeroBot-Plugin"; - version = "1.7.6"; + version = "1.8.0"; pwd = ./.; src = ./.; # spec go version manually bcs # https://github.com/nix-community/gomod2nix/blob/30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6/builder/default.nix#L130 - # do no work + # do not work go = pkgs.go_1_20; modules = ./gomod2nix.toml; } diff --git a/flake.nix b/flake.nix index 3493c0eda3..15e1b71cf3 100644 --- a/flake.nix +++ b/flake.nix @@ -22,11 +22,26 @@ callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage; in { # doCheck will fail at write files - packages.default = - (callPackage ./. { - inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; - }) - .overrideAttrs (_: {doCheck = false;}); + packages = rec { + + ZeroBot-Plugin = + (callPackage ./. { + inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; + }) + .overrideAttrs (_: {doCheck = false;}); + + default = ZeroBot-Plugin; + + docker_builder = pkgs.dockerTools.buildLayeredImage { + name = "ZeroBot-Plugin"; + tag = "latest"; + contents = [ + self.packages.${system}.ZeroBot-Plugin + pkgs.cacert + ]; + }; + + }; devShells.default = callPackage ./shell.nix { inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; };