Merge branch 'll-fix-fetchzip-darwin' of https://github.com/obsidiansystems/nixpkgs

This commit is contained in:
Shea Levy 2017-07-18 09:06:11 -04:00
commit 1ea9a69376

View File

@ -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" ]))