22 lines
445 B
Nix
22 lines
445 B
Nix
|
# 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);
|
||
|
|
||
|
}
|
||
|
)
|