chore(nix/fetchGoModule): remove overrideAttrs hack

This was based off fetchzip, but unlike fetchzip we don't need to
support arbitrary archive formats, so we don't actually need the unpack
hooks.

Change-Id: I5655c031f420422f13e72bb79f4b4b95f6f1204e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1640
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
edef 2020-08-04 15:06:54 +00:00 committed by edef
parent 5feed69260
commit ee627e07f1

View file

@ -14,7 +14,7 @@ in
{ path, version, sha256 }:
(pkgs.fetchurl {
pkgs.fetchurl {
name = "source";
url = "https://proxy.golang.org/${caseFold path}/@v/v${version}.zip";
inherit sha256;
@ -28,9 +28,7 @@ in
cd "$unpackDir"
mv "$downloadedFile" "$TMPDIR/src.zip"
unpackFile "$TMPDIR/src.zip"
${pkgs.unzip}/bin/unzip "$TMPDIR/src.zip" -d "$unpackDir"
mv "$unpackDir/${path}@v${version}" "$out"
'';
}).overrideAttrs ({ nativeBuildInputs ? [], ... }: {
nativeBuildInputs = nativeBuildInputs ++ [ pkgs.unzip ];
})
}