mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
Merge branch 'll-fix-fetchzip-darwin' of https://github.com/obsidiansystems/nixpkgs
This commit is contained in:
commit
1ea9a69376
@ -23,7 +23,6 @@ lib.overrideDerivation (fetchurl ({
|
|||||||
postFetch =
|
postFetch =
|
||||||
''
|
''
|
||||||
export PATH=${unzip}/bin:$PATH
|
export PATH=${unzip}/bin:$PATH
|
||||||
mkdir $out
|
|
||||||
|
|
||||||
unpackDir="$TMPDIR/unpack"
|
unpackDir="$TMPDIR/unpack"
|
||||||
mkdir "$unpackDir"
|
mkdir "$unpackDir"
|
||||||
@ -32,8 +31,6 @@ lib.overrideDerivation (fetchurl ({
|
|||||||
renamed="$TMPDIR/${baseNameOf url}"
|
renamed="$TMPDIR/${baseNameOf url}"
|
||||||
mv "$downloadedFile" "$renamed"
|
mv "$downloadedFile" "$renamed"
|
||||||
unpackFile "$renamed"
|
unpackFile "$renamed"
|
||||||
|
|
||||||
shopt -s dotglob
|
|
||||||
''
|
''
|
||||||
+ (if stripRoot then ''
|
+ (if stripRoot then ''
|
||||||
if [ $(ls "$unpackDir" | wc -l) != 1 ]; then
|
if [ $(ls "$unpackDir" | wc -l) != 1 ]; then
|
||||||
@ -43,12 +40,11 @@ lib.overrideDerivation (fetchurl ({
|
|||||||
fi
|
fi
|
||||||
fn=$(cd "$unpackDir" && echo *)
|
fn=$(cd "$unpackDir" && echo *)
|
||||||
if [ -f "$unpackDir/$fn" ]; then
|
if [ -f "$unpackDir/$fn" ]; then
|
||||||
mv "$unpackDir/$fn" "$out"
|
mkdir $out
|
||||||
else
|
|
||||||
mv "$unpackDir/$fn"/* "$out/"
|
|
||||||
fi
|
fi
|
||||||
|
mv "$unpackDir/$fn" "$out"
|
||||||
'' else ''
|
'' else ''
|
||||||
mv "$unpackDir"/* "$out/"
|
mv "$unpackDir" "$out"
|
||||||
'') #*/
|
'') #*/
|
||||||
+ extraPostFetch;
|
+ extraPostFetch;
|
||||||
} // removeAttrs args [ "stripRoot" "extraPostFetch" ]))
|
} // removeAttrs args [ "stripRoot" "extraPostFetch" ]))
|
||||||
|
Loading…
Reference in New Issue
Block a user