diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-09-21 12:55:12 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-09-21 12:55:32 -0400 |
commit | b97242238d7efb029c76eb8d4fe4b1228a5b49a8 (patch) | |
tree | ccc74a0fee384119a7138aedfac78e18152d0ca9 /pkgs/build-support | |
parent | 452a81c991d34fc5e6c56b7fdbcdff97c693b51f (diff) | |
download | nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.tar nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.tar.gz nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.tar.bz2 nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.tar.lz nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.tar.xz nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.tar.zst nixlib-b97242238d7efb029c76eb8d4fe4b1228a5b49a8.zip |
fetchzip: Use unzip from buildPackages
Additionally, the manual path manipulation becomes no longer needed.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchzip/default.nix | 11 |
1 files 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 ]; +}) |