constellation/bazel/go/go.nix
3u13r 9e1a0c06bf
Deps: bump Go to 1.21.3 (#2450)
* build: override go version to 1.21.3

* build: re-enable cachix

* ci: set $USER if not set
2023-10-12 16:11:02 +02:00

22 lines
503 B
Nix

let
pkgs = import <nixpkgs> { };
goAttr = pkgs.go_1_21.overrideAttrs (_: rec {
version = "1.21.3";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-GG8rb4yLcE5paCGwmrIEGlwe4T3LwxVqE63PdZMe5Ig=";
};
});
in
pkgs.buildEnv
{
name = "bazel-go-toolchain";
paths = [ goAttr ];
postBuild = ''
touch $out/ROOT
ln -s $out/share/go/{api,doc,lib,misc,pkg,src,go.env} $out/
'';
} // {
version = goAttr.version;
}