summary refs log tree commit diff
path: root/pkgs/build-support/fetchzip
diff options
context:
space:
mode:
authorluigy <luigy@outlook.com>2017-07-14 19:04:28 -0400
committerluigy <luigy@outlook.com>2017-07-17 11:23:20 -0400
commiteb6c45bcae6a7448cbe894167b81f96a7eb5dc0e (patch)
treef8d61c29b35fecbceed67d6d5c23fece683a15a0 /pkgs/build-support/fetchzip
parentf30dd71a388b327102a8bbc628aed1b04488e44d (diff)
downloadnixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.tar
nixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.tar.gz
nixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.tar.bz2
nixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.tar.lz
nixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.tar.xz
nixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.tar.zst
nixpkgs-eb6c45bcae6a7448cbe894167b81f96a7eb5dc0e.zip
Fix #27448 argument list too long in fetchzip for darwin.
Paired with @Ericson2314
Diffstat (limited to 'pkgs/build-support/fetchzip')
-rw-r--r--pkgs/build-support/fetchzip/default.nix10
1 files changed, 3 insertions, 7 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index 1145d32ba02..751dba56930 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -23,7 +23,6 @@ lib.overrideDerivation (fetchurl ({
   postFetch =
     ''
       export PATH=${unzip}/bin:$PATH
-      mkdir $out
 
       unpackDir="$TMPDIR/unpack"
       mkdir "$unpackDir"
@@ -32,8 +31,6 @@ lib.overrideDerivation (fetchurl ({
       renamed="$TMPDIR/${baseNameOf url}"
       mv "$downloadedFile" "$renamed"
       unpackFile "$renamed"
-
-      shopt -s dotglob
     ''
     + (if stripRoot then ''
       if [ $(ls "$unpackDir" | wc -l) != 1 ]; then
@@ -43,12 +40,11 @@ lib.overrideDerivation (fetchurl ({
       fi
       fn=$(cd "$unpackDir" && echo *)
       if [ -f "$unpackDir/$fn" ]; then
-        mv "$unpackDir/$fn" "$out"
-      else
-        mv "$unpackDir/$fn"/* "$out/"
+        mkdir $out
       fi
+      mv "$unpackDir/$fn" "$out"
     '' else ''
-      mv "$unpackDir"/* "$out/"
+      mv "$unpackDir" "$out"
     '') #*/
     + extraPostFetch;
 } // removeAttrs args [ "stripRoot" "extraPostFetch" ]))