From ee627e07f1ea875ab5c1c55ebb4ed5ec5747b8a8 Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 4 Aug 2020 15:06:54 +0000 Subject: [PATCH] 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 Reviewed-by: tazjin --- nix/fetchGoModule/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nix/fetchGoModule/default.nix b/nix/fetchGoModule/default.nix index 3f0784ad8..4f0cdb4b7 100644 --- a/nix/fetchGoModule/default.nix +++ b/nix/fetchGoModule/default.nix @@ -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 ]; -}) +}