mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +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 =
|
||||
''
|
||||
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" ]))
|
||||
|
Loading…
Reference in New Issue
Block a user