From b97242238d7efb029c76eb8d4fe4b1228a5b49a8 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 21 Sep 2018 12:55:12 -0400 Subject: [PATCH] fetchzip: Use unzip from buildPackages Additionally, the manual path manipulation becomes no longer needed. --- pkgs/build-support/fetchzip/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix index 4a5381d71f20..f1b9b9290d4c 100644 --- a/pkgs/build-support/fetchzip/default.nix +++ b/pkgs/build-support/fetchzip/default.nix @@ -14,7 +14,7 @@ , name ? "source" , ... } @ args: -lib.overrideDerivation (fetchurl ({ +(fetchurl ({ inherit name; recursiveHash = true; @@ -23,8 +23,6 @@ lib.overrideDerivation (fetchurl ({ postFetch = '' - export PATH=${unzip}/bin:$PATH - unpackDir="$TMPDIR/unpack" mkdir "$unpackDir" cd "$unpackDir" @@ -48,6 +46,7 @@ lib.overrideDerivation (fetchurl ({ mv "$unpackDir" "$out" '') #*/ + extraPostFetch; -} // removeAttrs args [ "stripRoot" "extraPostFetch" ])) -# Hackety-hack: we actually need unzip hooks, too -(x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];}) +} // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: { + # Hackety-hack: we actually need unzip hooks, too + nativeBuildInputs = x.nativeBuildInputs ++ [ unzip ]; +})