fetchzip: remove need for overrideAttrs
This commit is contained in:
parent
b97b9c376c
commit
24cbda98f3
|
@ -95,6 +95,9 @@ in
|
||||||
# Doing the download on a remote machine just duplicates network
|
# Doing the download on a remote machine just duplicates network
|
||||||
# traffic, so don't do that by default
|
# traffic, so don't do that by default
|
||||||
, preferLocalBuild ? true
|
, preferLocalBuild ? true
|
||||||
|
|
||||||
|
# Additional packages needed as part of a fetch
|
||||||
|
, nativeBuildInputs ? [ ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
|
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
|
||||||
|
@ -128,7 +131,7 @@ stdenvNoCC.mkDerivation {
|
||||||
|
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
nativeBuildInputs = [ curl ];
|
nativeBuildInputs = [ curl ] ++ nativeBuildInputs;
|
||||||
|
|
||||||
urls = urls_;
|
urls = urls_;
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
, urls ? []
|
, urls ? []
|
||||||
, extraPostFetch ? ""
|
, extraPostFetch ? ""
|
||||||
, name ? "source"
|
, name ? "source"
|
||||||
|
, nativeBuildInputs ? [ ]
|
||||||
, # Allows to set the extension for the intermediate downloaded
|
, # Allows to set the extension for the intermediate downloaded
|
||||||
# file. This can be used as a hint for the unpackCmdHooks to select
|
# file. This can be used as a hint for the unpackCmdHooks to select
|
||||||
# an appropriate unpacking tool.
|
# an appropriate unpacking tool.
|
||||||
|
@ -31,6 +32,8 @@ in {
|
||||||
|
|
||||||
downloadToTemp = true;
|
downloadToTemp = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
|
||||||
|
|
||||||
postFetch =
|
postFetch =
|
||||||
''
|
''
|
||||||
unpackDir="$TMPDIR/unpack"
|
unpackDir="$TMPDIR/unpack"
|
||||||
|
@ -64,7 +67,4 @@ in {
|
||||||
+ ''
|
+ ''
|
||||||
chmod 755 "$out"
|
chmod 755 "$out"
|
||||||
'';
|
'';
|
||||||
} // removeAttrs args [ "stripRoot" "extraPostFetch" "extension" ])).overrideAttrs (x: {
|
} // removeAttrs args [ "stripRoot" "extraPostFetch" "extension" "nativeBuildInputs" ]))
|
||||||
# Hackety-hack: we actually need unzip hooks, too
|
|
||||||
nativeBuildInputs = x.nativeBuildInputs ++ [ unzip ];
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in a new issue