Skip to content

Commit

Permalink
Fix #27448 argument list too long in fetchzip for darwin.
Browse files Browse the repository at this point in the history
Paired with @Ericson2314

(cherry picked from commit eb6c45b)
  • Loading branch information
luigy authored and shlevy committed Jul 18, 2017
1 parent cf614ba commit e4d6399
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkgs/build-support/fetchzip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ lib.overrideDerivation (fetchurl ({
postFetch =
''
export PATH=${unzip}/bin:$PATH
mkdir $out
unpackDir="$TMPDIR/unpack"
mkdir "$unpackDir"
Expand All @@ -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
Expand All @@ -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" ]))
Expand Down

0 comments on commit e4d6399

Please sign in to comment.