diff options
author | Vincent Ambo <mail@tazj.in> | 2021-11-21T21·09+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-01-17T14·18+0000 |
commit | 1c81ccb99634d107eb7f9b986bc4822c7a517d13 (patch) | |
tree | d481efeed953557bb5611c957133194980354251 /third_party/gopkgs/github.com | |
parent | 1d281151dedcfe1795e03755a1cf22b08d96cd30 (diff) |
fix(3p): Move away from builtins.fetchGit r/3619
Moves to the derivation-based git fetchers everywhere in third-party. This might help with forward-compatibility with newer Nix versions, though that's not our primary concern right now. Change-Id: I565bb72585b8639893e9ea3a9e233338aede63a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3903 Tested-by: BuildkiteCI Reviewed-by: zseri <zseri.devel@ytrizja.de>
Diffstat (limited to 'third_party/gopkgs/github.com')
4 files changed, 23 insertions, 13 deletions
diff --git a/third_party/gopkgs/github.com/golang/groupcache/default.nix b/third_party/gopkgs/github.com/golang/groupcache/default.nix index 4c12173ed960..c2fc341feafd 100644 --- a/third_party/gopkgs/github.com/golang/groupcache/default.nix +++ b/third_party/gopkgs/github.com/golang/groupcache/default.nix @@ -1,9 +1,15 @@ -{ depot, ... }: +{ depot, pkgs, ... }: depot.nix.buildGo.external { path = "github.com/golang/groupcache"; - src = builtins.fetchGit { + + src = pkgs.fetchgit { url = "https://github.com/golang/groupcache"; rev = "611e8accdfc92c4187d399e95ce826046d4c8d73"; + hash = "sha256:0ydaq1xn03h2arfdri0vcv0df19pk8dvq4ly5hm1kv18yjfv1v13"; }; + + deps = with depot.third_party; [ + gopkgs."github.com".golang.protobuf.proto + ]; } diff --git a/third_party/gopkgs/github.com/golang/protobuf/default.nix b/third_party/gopkgs/github.com/golang/protobuf/default.nix index 5a4290dec2a1..119eafb42c15 100644 --- a/third_party/gopkgs/github.com/golang/protobuf/default.nix +++ b/third_party/gopkgs/github.com/golang/protobuf/default.nix @@ -1,9 +1,11 @@ -{ depot, ... }: +{ depot, pkgs, ... }: depot.nix.buildGo.external { path = "github.com/golang/protobuf"; - src = builtins.fetchGit { + + src = pkgs.fetchgit { url = "https://github.com/golang/protobuf"; rev = "ed6926b37a637426117ccab59282c3839528a700"; + hash = "sha256:0fynqrim022x9xi2bivkw19npbz4316v4yr7mb677s9s36z4dc4h"; }; } diff --git a/third_party/gopkgs/github.com/googleapis/gax-go/default.nix b/third_party/gopkgs/github.com/googleapis/gax-go/default.nix index 4c2d8dbd39a6..63c6f4b1d764 100644 --- a/third_party/gopkgs/github.com/googleapis/gax-go/default.nix +++ b/third_party/gopkgs/github.com/googleapis/gax-go/default.nix @@ -1,13 +1,13 @@ -{ depot, ... }: +{ depot, pkgs, ... }: -let - inherit (depot) buildGo; - inherit (builtins) fetchGit; -in depot.nix.buildGo.external { +depot.nix.buildGo.external { path = "github.com/googleapis/gax-go"; - src = fetchGit { - url = "https://github.com/googleapis/gax-go"; + + src = pkgs.fetchFromGitHub { + owner = "googleapis"; + repo = "gax-go"; rev = "b443e5a67ec8eeac76f5f384004931878cab24b3"; + sha256 = "075s8b76l14c9vlchly38hsf28bnr7vzq9q57g2kg1025h004lzw"; }; deps = with depot.third_party; [ diff --git a/third_party/gopkgs/github.com/hashicorp/golang-lru/default.nix b/third_party/gopkgs/github.com/hashicorp/golang-lru/default.nix index 417826adab51..8d540877d577 100644 --- a/third_party/gopkgs/github.com/hashicorp/golang-lru/default.nix +++ b/third_party/gopkgs/github.com/hashicorp/golang-lru/default.nix @@ -1,10 +1,12 @@ -{ depot, ... }: +{ depot, pkgs, ... }: depot.nix.buildGo.external { path = "github.com/hashicorp/golang-lru"; - src = builtins.fetchGit { + + src = pkgs.fetchgit { url = "https://github.com/hashicorp/golang-lru"; rev = "7f827b33c0f158ec5dfbba01bb0b14a4541fd81d"; + hash = "sha256:1p2igd58xkm8yaj2c2wxiplkf2hj6kxwrg6ss7mx61s5rd71v5xb"; }; deps = with depot.third_party; [ |