mirror of
https://github.com/NixOS/nix.git
synced 2025-12-15 13:31:05 +01:00
Respect the narHash attribute in more input types
call-flake.nix now passes node.info.narHash to fetchTree. This ensures that dirty Git trees work even in pure mode.
This commit is contained in:
parent
78ad5b3d91
commit
a6ff66b658
6 changed files with 12 additions and 9 deletions
|
|
@ -29,8 +29,10 @@ std::unique_ptr<Input> inputFromURL(const std::string & url)
|
|||
|
||||
std::unique_ptr<Input> inputFromAttrs(const Attrs & attrs)
|
||||
{
|
||||
auto attrs2(attrs);
|
||||
attrs2.erase("narHash");
|
||||
for (auto & inputScheme : *inputSchemes) {
|
||||
auto res = inputScheme->inputFromAttrs(attrs);
|
||||
auto res = inputScheme->inputFromAttrs(attrs2);
|
||||
if (res) {
|
||||
if (auto narHash = maybeGetStrAttr(attrs, "narHash"))
|
||||
// FIXME: require SRI hash.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue