mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02: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
|
@ -8,7 +8,10 @@ let
|
|||
builtins.mapAttrs
|
||||
(key: node:
|
||||
let
|
||||
sourceInfo = if key == lockFile.root then rootSrc else fetchTree (removeAttrs node.locked ["dir"]);
|
||||
sourceInfo =
|
||||
if key == lockFile.root
|
||||
then rootSrc
|
||||
else fetchTree ({ inherit (node.info) narHash; } // removeAttrs node.locked ["dir"]);
|
||||
subdir = if key == lockFile.root then rootSubdir else node.locked.dir or "";
|
||||
flake = import (sourceInfo + (if subdir != "" then "/" else "") + subdir + "/flake.nix");
|
||||
inputs = builtins.mapAttrs (inputName: key: allNodes.${key}) (node.inputs or {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue