fetchzip: Use unzip from buildPackages

Additionally, the manual path manipulation becomes no longer needed.
This commit is contained in:
John Ericson 2018-09-21 12:55:12 -04:00
parent 452a81c991
commit b97242238d

View File

@ -14,7 +14,7 @@
, name ? "source" , name ? "source"
, ... } @ args: , ... } @ args:
lib.overrideDerivation (fetchurl ({ (fetchurl ({
inherit name; inherit name;
recursiveHash = true; recursiveHash = true;
@ -23,8 +23,6 @@ lib.overrideDerivation (fetchurl ({
postFetch = postFetch =
'' ''
export PATH=${unzip}/bin:$PATH
unpackDir="$TMPDIR/unpack" unpackDir="$TMPDIR/unpack"
mkdir "$unpackDir" mkdir "$unpackDir"
cd "$unpackDir" cd "$unpackDir"
@ -48,6 +46,7 @@ lib.overrideDerivation (fetchurl ({
mv "$unpackDir" "$out" mv "$unpackDir" "$out"
'') #*/ '') #*/
+ extraPostFetch; + extraPostFetch;
} // removeAttrs args [ "stripRoot" "extraPostFetch" ])) } // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: {
# Hackety-hack: we actually need unzip hooks, too # Hackety-hack: we actually need unzip hooks, too
(x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];}) nativeBuildInputs = x.nativeBuildInputs ++ [ unzip ];
})