mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
Add a Store::addToStore() variant that accepts a NAR
As a side effect, this ensures that signatures are propagated when copying paths between stores. Also refactored import/export to make use of this.
This commit is contained in:
parent
b6c768fb6a
commit
538a64e8c3
15 changed files with 235 additions and 338 deletions
|
|
@ -31,7 +31,7 @@ void builtinFetchurl(const BasicDerivation & drv)
|
|||
auto unpack = drv.env.find("unpack");
|
||||
if (unpack != drv.env.end() && unpack->second == "1") {
|
||||
if (string(*data.data, 0, 6) == string("\xfd" "7zXZ\0", 6))
|
||||
data.data = decompress("xz", ref<std::string>(data.data));
|
||||
data.data = decompress("xz", *data.data);
|
||||
StringSource source(*data.data);
|
||||
restorePath(storePath, source);
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue