isle/nix/overlays/go_1_18.nix
Brian Picciano 17fb9bbd77 Add a flake.nix
I spent some time trying to get compilation on non-x86_64 systems
possibly working, but we're currently limited by AppImage, which doesn't
want to work properly.
2023-01-28 20:43:09 +01:00

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