chore(nix/fetchGoModule): Move //users/edef/fetchGoModule to //nix
Change-Id: Ie7f52367ef91c0c8017a36c2a6c7edb06f10e57d Reviewed-on: https://cl.tvl.fyi/c/depot/+/1589 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
6b181d314f
commit
8d6fcbe1a5
3 changed files with 3 additions and 1 deletions
|
@ -1,24 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{ path, version, sha256 }:
|
||||
|
||||
(pkgs.fetchurl {
|
||||
name = "source";
|
||||
url = "https://proxy.golang.org/${path}/@v/v${version}.zip";
|
||||
inherit sha256;
|
||||
|
||||
recursiveHash = true;
|
||||
downloadToTemp = true;
|
||||
|
||||
postFetch = ''
|
||||
unpackDir="$TMPDIR/unpack"
|
||||
mkdir "$unpackDir"
|
||||
cd "$unpackDir"
|
||||
|
||||
mv "$downloadedFile" "$TMPDIR/src.zip"
|
||||
unpackFile "$TMPDIR/src.zip"
|
||||
mv "$unpackDir/${path}@v${version}" "$out"
|
||||
'';
|
||||
}).overrideAttrs ({ nativeBuildInputs ? [], ... }: {
|
||||
nativeBuildInputs = nativeBuildInputs ++ [ pkgs.unzip ];
|
||||
})
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let
|
||||
|
||||
inherit (depot.users.edef) fetchGoModule;
|
||||
inherit (depot.nix) fetchGoModule;
|
||||
|
||||
in
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue