NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.9k stars 1.53k forks source link

fetchTree: Don't crash if narHash is missing #11933

Closed edolstra closed 3 days ago

edolstra commented 4 days ago

Motivation

Fixes

nix: ../src/libexpr/primops/fetchTree.cc:37: void nix::emitTreeAttrs(EvalState&, const StorePath&, const fetchers::Input&, Value&, bool, bool): Assertion `narHash' failed.

on a lock file with an input that doesn't have a narHash. This can happen when using a lock file created by the lazy-trees branch.

Cherry-picked from lazy-trees.

Context


Add :+1: to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Mic92 commented 3 days ago

@mergify queue

mergify[bot] commented 3 days ago

queue

🛑 The pull request has been merged manually

The pull request has been merged manually at *838d3c1ad0aaf175b1244f09057f83660d27dd0f*