diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 1ff61a6041a2..0cb03b3cbfb0 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -6,16 +6,16 @@ let isGo14 = go.meta.branch == "1.4"; + self = _self // overrides; _self = with self; { + + inherit go buildGoPackage; + buildFromGitHub = { rev, date ? null, owner, repo, sha256, name ? repo, goPackagePath ? "github.com/${owner}/${repo}", ... }@args: buildGoPackage (args // { inherit rev goPackagePath; name = "${name}-${if date != null then date else if builtins.stringLength rev != 40 then rev else stdenv.lib.strings.substring 0 7 rev}"; src = fetchFromGitHub { inherit rev owner repo sha256; }; }); - self = _self // overrides; _self = with self; { - - inherit go buildGoPackage; - ## OFFICIAL GO PACKAGES crypto = buildFromGitHub {