03618ba72c
This allowed for deleting all script utilities and environment variable logic.
39 lines
856 B
Nix
39 lines
856 B
Nix
rec {
|
|
|
|
overlays = [
|
|
|
|
# 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);
|
|
|
|
}
|
|
)
|
|
];
|
|
|
|
version = "22-05";
|
|
rev = "2aec372cdcd4d73b94863611fea70e0884270fdc";
|
|
|
|
src = fetchTarball {
|
|
name = "nixpkgs-${version}";
|
|
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
|
|
sha256 = "1pbfhlh4v8l70p44gspsci3i6w0wk70vaisiawg3jhka2nxb8367";
|
|
};
|
|
|
|
pkgs = import src { inherit overlays; };
|
|
}
|