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:
parent
5feed69260
commit
ee627e07f1
1 changed files with 3 additions and 5 deletions
|
@ -14,7 +14,7 @@ in
|
||||||
|
|
||||||
{ path, version, sha256 }:
|
{ path, version, sha256 }:
|
||||||
|
|
||||||
(pkgs.fetchurl {
|
pkgs.fetchurl {
|
||||||
name = "source";
|
name = "source";
|
||||||
url = "https://proxy.golang.org/${caseFold path}/@v/v${version}.zip";
|
url = "https://proxy.golang.org/${caseFold path}/@v/v${version}.zip";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
|
@ -28,9 +28,7 @@ in
|
||||||
cd "$unpackDir"
|
cd "$unpackDir"
|
||||||
|
|
||||||
mv "$downloadedFile" "$TMPDIR/src.zip"
|
mv "$downloadedFile" "$TMPDIR/src.zip"
|
||||||
unpackFile "$TMPDIR/src.zip"
|
${pkgs.unzip}/bin/unzip "$TMPDIR/src.zip" -d "$unpackDir"
|
||||||
mv "$unpackDir/${path}@v${version}" "$out"
|
mv "$unpackDir/${path}@v${version}" "$out"
|
||||||
'';
|
'';
|
||||||
}).overrideAttrs ({ nativeBuildInputs ? [], ... }: {
|
}
|
||||||
nativeBuildInputs = nativeBuildInputs ++ [ pkgs.unzip ];
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in a new issue