mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
Handle importing NARs containing files greater than 4 GiB
Also templatize readInt() to work for various integer types.
This commit is contained in:
parent
0780805246
commit
c4a40949d9
7 changed files with 84 additions and 81 deletions
|
@ -397,8 +397,8 @@ PathSet BasicDerivation::outputPaths() const
|
|||
Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
|
||||
{
|
||||
drv.outputs.clear();
|
||||
auto nr = readInt(in);
|
||||
for (unsigned int n = 0; n < nr; n++) {
|
||||
auto nr = readNum<size_t>(in);
|
||||
for (size_t n = 0; n < nr; n++) {
|
||||
auto name = readString(in);
|
||||
DerivationOutput o;
|
||||
in >> o.path >> o.hashAlgo >> o.hash;
|
||||
|
@ -410,8 +410,8 @@ Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
|
|||
in >> drv.platform >> drv.builder;
|
||||
drv.args = readStrings<Strings>(in);
|
||||
|
||||
nr = readInt(in);
|
||||
for (unsigned int n = 0; n < nr; n++) {
|
||||
nr = readNum<size_t>(in);
|
||||
for (size_t n = 0; n < nr; n++) {
|
||||
auto key = readString(in);
|
||||
auto value = readString(in);
|
||||
drv.env[key] = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue