2021-04-20 21:31:37 +00:00
|
|
|
rec {
|
|
|
|
|
|
|
|
overlays = [
|
|
|
|
|
2022-10-26 20:18:16 +00:00
|
|
|
# Make buildGoModules use static compilation by default, and use go 1.18
|
|
|
|
# everywhere.
|
2022-10-07 13:46:29 +00:00
|
|
|
(final: prev:
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2022-10-07 13:46:29 +00:00
|
|
|
let
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2022-10-07 13:46:29 +00:00
|
|
|
buildArgs = {
|
|
|
|
doCheck = false;
|
|
|
|
CGO_ENABLED=0;
|
|
|
|
tags = [ "netgo" "timetzdata" ];
|
|
|
|
ldflags = [ "-w" "-extldflags=-static" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
2022-10-20 20:30:30 +00:00
|
|
|
go = prev.go_1_18;
|
2022-10-26 20:18:16 +00:00
|
|
|
buildGoModule = args: prev.buildGo118Module (buildArgs // args);
|
2022-10-07 13:46:29 +00:00
|
|
|
buildGo118Module = args: prev.buildGo118Module (buildArgs // args);
|
|
|
|
|
|
|
|
}
|
|
|
|
)
|
2021-04-20 21:31:37 +00:00
|
|
|
];
|
|
|
|
|
2022-10-20 20:30:30 +00:00
|
|
|
version = "22-05";
|
|
|
|
rev = "2aec372cdcd4d73b94863611fea70e0884270fdc";
|
|
|
|
|
|
|
|
src = fetchTarball {
|
|
|
|
name = "nixpkgs-${version}";
|
|
|
|
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
|
2022-10-07 13:19:10 +00:00
|
|
|
sha256 = "1pbfhlh4v8l70p44gspsci3i6w0wk70vaisiawg3jhka2nxb8367";
|
2021-04-20 21:31:37 +00:00
|
|
|
};
|
|
|
|
|
2022-10-20 20:30:30 +00:00
|
|
|
pkgs = import src { inherit overlays; };
|
2021-04-20 21:31:37 +00:00
|
|
|
}
|