feat: add docker builder use nix (#911)

* fix(typo): no -> not

* fix: update version

* feat: use nix to build docker image

* feat: ignore nix result

* fix(nix docker builder): failed to verify certificate
This commit is contained in:
Nobody6825
2024-05-19 12:50:50 +08:00
committed by GitHub
parent a29b116f0d
commit 6210ed9496
3 changed files with 23 additions and 7 deletions

View File

@@ -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;
};