isle/nix/overlays/go_1_18.nix

22 lines
445 B
Nix
Raw Normal View History

# Make buildGoModules use static compilation by default, and use go 1.18
# everywhere.
(final: prev:
let
buildArgs = {
doCheck = false;
CGO_ENABLED=0;
tags = [ "netgo" "timetzdata" ];
ldflags = [ "-w" "-extldflags=-static" ];
};
in {
go = prev.go_1_18;
buildGoModule = args: prev.buildGo118Module (buildArgs // args);
buildGo118Module = args: prev.buildGo118Module (buildArgs // args);
}
)