diff --git a/flake.nix b/flake.nix index 0a51a05c07..cc949a0fe8 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,10 @@ , ... }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { inherit system; }; + pkgs = import nixpkgs { + inherit system; + overlays = [ (import ./overlays/nixpkgs.nix) ]; + }; inherit (pkgs) lib; treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix; in diff --git a/overlays/nixpkgs.nix b/overlays/nixpkgs.nix new file mode 100644 index 0000000000..73c30a88f9 --- /dev/null +++ b/overlays/nixpkgs.nix @@ -0,0 +1,11 @@ +final: prev: { + # Drop when the update reaches the unstable channel: + # https://nixpk.gs/pr-tracker.html?pr=293563 + go = prev.go.overrideAttrs (finalAttrs: _prevAttrs: { + version = "1.21.8"; + src = final.fetchurl { + url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz"; + hash = "sha256-3IBs91qH4UFLW0w9y53T6cyY9M/M7EK3r2F9WmWKPEM="; + }; + }); +}