Rename namespace to docker.tools

I have tested this version in the datoms project.
This commit is contained in:
Jim Clark
2023-04-22 20:27:02 -07:00
committed by James Carnegie
parent 4f77f40fb2
commit 63d3cc2f0a
8 changed files with 53 additions and 29 deletions

View File

@@ -11,22 +11,41 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [ go gotools golangci-lint gopls gopkgs go-outline ];
};
packages = {
packages = rec {
default = pkgs.buildGoModule {
pname = "babashka-pod-docker";
version = "0.0.1";
src = ./.;
vendorSha256 = "sha256-KUWqddPcv+hLStd7JEzQBUiGLPLYwfmyVoG1BtaHWXY=";
postInstall = ''
mv $out/bin/parser $out/bin/babashka-pod-docker
'';
# uncomment this and re-run to find the new vendor sha when module deps change
# note that you'll get inconsistent vendor deps if this gets out of sync because
# this sha defines the input for the mod deps derivation
# vendorSha256 = nixpkgs.lib.fakeSha256;
vendorSha256 = "sha256-jCjNhi0eqEBNPts/xmbwugs0T6HUw1ESip/li4/J6YY=";
CGO_ENABLED = 0;
};
docker = pkgs.dockerTools.buildImage {
name = "docker-pod";
tag = "latest";
config = {
Cmd = ["${default}/bin/babashka-pod-docker"];
};
};
default-linux = default.overrideAttrs (old: old // {GOOS = "linux"; GOARCH = "arm64";});
docker-arm64 = pkgs.dockerTools.buildImage {
name = "docker-pod";
tag = "latest";
config = {
Cmd = ["${default-linux}/bin/linux_arm64/babashka-pod-docker"];
};
};
};
});
}